microsoft / microsoft/react-native-windows
Commit changes when failing VS AutoLinkCheck
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 17.3k
- Forks
- 1.2k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 33
Description
In VS Builds we run nx react-native autolink-windows --check, which does a dry run of autolinking logic. This is done to avoid mutating build files during the actual build.
An alternate approach is to write the files, then fail the build, messaging the user that their files were updated. This still requires multiple builds, but removes a trip to the command-line for manual steps.
As a proof of concept I tried the following sequence of events:
- Started a build
- Mutated packages.config during the build
- Canceled the build
- Started a solution build
The new NuGet package was restored on the next build, meaning we should be able to fail the build a single time and have changes picked up the next.
So, we could change the current:
Warning: Auto-linking changes were necessary but '--check' was specified. Run 'npx react-native autolink-windows' to apply the changes.
to
Auto-linking updated your project. Please rebuild for changes to take effect.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the VS Builds invocation of nx react-native autolink-windows --check and the handling of its warning. Review how packages.config is mutated and restored during the next solution build. Done means the build updates the project, reports that a rebuild is required, and no longer instructs users to run the command manually.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react-native
- Domain
- build-system, devtools
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100