Skip to content

Conversation

@Bartleby2718
Copy link

@madelson There are some open questions in #119, but filing a PR to get some feedback.

[TestCase("", "\"", "\\", "")]
[TestCase("abc", "a\\b", "a\\ b\"")]
// these chars are treated specially on mono unix
// these chars are treated specially on mono unix, so keeping.
Copy link
Author

@Bartleby2718 Bartleby2718 May 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whenever I wasn't sure what to do about Mono-related comments, I either deleted it or modified it so that it shows up in the diff.


[Test]
public Task TestWriteAfterExit() => RunTestAsync(() => PlatformCompatibilityTests.TestWriteAfterExit());
// TODO: fix in https://github.com/madelson/MedallionShell/issues/117
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is fine for now because this must be fixed before 1.7 is released.

// other types of IOExceptions (e. g. FileNotFoundException, PathTooLongException) that could in
// theory be thrown here and trigger this
when (IsMono && ex.GetType() == typeof(IOException))
catch
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also not sure what to do here...

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copypasted from net6.0


AssertThrows<Win32Exception>(() => Command.Run(baseDirectory));
AssertThrows<Win32Exception>(() => Command.Run(Path.Combine(baseDirectory, "DOES_NOT_EXIST.exe")));
AssertThrows<InvalidOperationException>(() => Command.Run(baseDirectory));
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was failing for all target frameworks, so I think this is a breaking change in a more recent version of .NET SDK, but I couldn't find anything that seems relevant in https://learn.microsoft.com/en-us/dotnet/core/compatibility/8.0 or https://learn.microsoft.com/en-us/dotnet/core/compatibility/7.0.

matrix:
only:
-
image: "Ubuntu"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missed in the previous PR; we temporarily lost coverage for Ubuntu 22.04.

</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This way, we don't have to update this line when we change from net462 to net472. You can see that this technique is being used in https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/blob/dev/src/Microsoft.IdentityModel.Protocols/Microsoft.IdentityModel.Protocols.csproj#L29.

@Bartleby2718
Copy link
Author

@madelson This blocks other PRs, so I'd appreciate it if you could review this first!

@Bartleby2718 Bartleby2718 requested a review from madelson June 29, 2024 04:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants