-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NativeAOT] Fix --make-repro-path
ILC option
#90935
Conversation
/cc: @am11 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! In my mind, I was confident that I have tested this scenario when I sent out the PR, but apparently additional hyphens was not something I paid attention to. 🙈
@ivanpovazan, not for this PR, but do you think we can create a test for make-repro? e.g. build a command with many options and arguments and run it with make-repro, then extract the repro package, rerun the extracted command and compare results. cc @adamsitnik |
No worries, I accidentally bumped into this. As you rightfully suggested:
it would be great to have a test, so we catch this kind of unintentional regressions. However, covering all supported switches seems like a moving target, so not exactly sure what would the test look like. Additionally, would we just check whether the resulting |
I agree. Perhaps the options which are frequently used by ILC, e.g. from
I think the original and generated rsp files are not comparable easily. Moreover, if we want to also verify that the repro package actually works, we can do something similar to:
|
That sounds good, however I am not sure where would such test be placed (we had similar discussions around build/running ios test apps, which ended up being treated as functional tests - sharing the Mono setup). @MichalStrehovsky what do you think? |
dotnet/runtime repo does not have a good place for tests that exercise E2E tool flows. A good place to add a test like this one would be the SDK repo (see https://github.com/dotnet/sdk/blob/364773edba30d46ac95e3b32c08f46168e96bd35/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAnAotApp.cs for prior art). |
/backport to release/8.0 |
Started backporting to release/8.0: https://github.com/dotnet/runtime/actions/runs/5952974913 |
Opened #91013 |
This PR fixes a regression with
--make-repro-path
command line option which was caused by upgrading theSystem.CommandLine
version in: #84229The issue is related to the fact that
CliOption.Name
now includes--
(eg: option.Name ==--targetos:OSX
) causing--make-repro-path
to generate extra hyphens in therepro.rsp
file, for example:Tested manually by:
repro.zip
by including the--make-repro-path
option during compilationrepro.rsp