-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fix NuGet lock files and remove RestoreForceEvaluate from CI builds #13634
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
jonthysell
changed the title
Remove RestoreForceEvaluate from builds
Fix NuGet lock files and remove RestoreForceEvaluate from CI builds
Aug 29, 2024
This was referenced Sep 6, 2024
jonthysell
added a commit
that referenced
this pull request
Sep 6, 2024
## Description This PR fixes the two issues with `run-windows --msbuildprops` 1. When passing nothing, the command should not error and exit 2. When the string is parsed into key/value pairs, do not add empty keys to the msbuild command (which will cause msbuild to fail) ### Type of Change - Bug fix (non-breaking change which fixes an issue) ### Why Ran into these issues while working on PR #13634, extracted them as general bug fixes here. ### What See above. ## Screenshots N/A ## Testing Verified running `run-windows` with malformed `--msbuildprops` no longer errors. ## Changelog Should this change be included in the release notes: _yes_ Fix parsing of empty build props in run-windows
jonthysell
added a commit
that referenced
this pull request
Sep 7, 2024
…er build (#13669) ## Description Fixes the task which checked for changed `packages.lock.json` files so that it actually detects changes in the files. ### Type of Change - Bug fix (non-breaking change which fixes an issue) ### Why To get more warnings when a forced NuGet restore has changed the lock file. Extracted from PR #13634 ### What See above. ## Screenshots N/A ## Testing N/A ## Changelog Should this change be included in the release notes: _no_
jonthysell
added a commit
that referenced
this pull request
Sep 9, 2024
## Description SourceLink is needed to ensure that our NuGet packages have matching source information when symbols are resolved. So we have an `EnableSourceLink` property which tells some of our projects to add source link, and we enable that when doing CI/PR/official builds by setting the property to true when we call msbuild in our pipelines. This PR makes it so that instead of having to pass that property, the projects themselves automatically build with source link when they need to. ### Type of Change - New feature (non-breaking change which adds functionality) ### Why This makes it so that local builds of RNW are closer to the the same nuget restore behavior / packages.lock.json file as when they're built in pipelines. This is part is working toward resolving #12004 and this functionality was extracted from PR #13634. ### What Instead of requiring us to call msbuild with `/p:EnableSourceLink=true` for every solution (or relying on setting it in `ExperimentalFeatures.props`) we now detect when our library projects are being built within the repo (detecting the `src-win` folder which isn't present in the NPM publish) and enable source link then. ## Screenshots N/A ## Testing N/A ## Changelog Should this change be included in the release notes: _yes_ Automatically set EnableSourceLink for in-repo builds only
jonthysell
added a commit
that referenced
this pull request
Sep 10, 2024
## Description Projects "built for Fabric" depend on the `Microsoft.WindowsAppSDK`, while projects "built for Paper" rely on `Microsoft.UI.Xaml`, both of which are mutually exclusive. This leads to a lot of PRs with a spurious flip-flopping of the contents of nuget package lock files, depending on which flavor the author happened to build against. This PR enables a new separate fabric lock file for projects and also updates all of the lock files. ### Type of Change - New feature (non-breaking change which adds functionality) ### Why This makes it so that local builds of RNW are closer to the the same nuget restore behavior / packages.lock.json file as when they're built in pipelines, namely to reduce the number of spurious lock file changes we see in PRs. This is part is working toward resolving #12004 and this functionality was extracted from PR #13634. ### What For projects building within our repo that can be built as either Paper or Fabric variants, we now maintain a separate "fabric" nuget lock file: `packages.fabric.lock.json` alongside the normal `packages.lock.json` file (which can be either "paper" or "fabric" depending on what the project normally builds with). ## Screenshots N/A ## Testing N/A ## Changelog Should this change be included in the release notes: _yes_ Create separate NuGet restore lock files for Fabric builds
jonthysell
added a commit
to jonthysell/react-native-windows
that referenced
this pull request
Sep 11, 2024
This PR backports microsoft#13665 to 0.75. ## Description This PR fixes the two issues with `run-windows --msbuildprops` 1. When passing nothing, the command should not error and exit 2. When the string is parsed into key/value pairs, do not add empty keys to the msbuild command (which will cause msbuild to fail) ### Type of Change - Bug fix (non-breaking change which fixes an issue) ### Why Ran into these issues while working on PR microsoft#13634, extracted them as general bug fixes here. ### What See above. ## Screenshots N/A ## Testing Verified running `run-windows` with malformed `--msbuildprops` no longer errors. ## Changelog Should this change be included in the release notes: _yes_ Fix parsing of empty build props in run-windows
# This is the 1st commit message: test from rnbot 3 # This is the commit message #2: Change files # This is the commit message #3: Add sourcelink # This is the commit message #5: Change files # This is the commit message #8: temporarily re-force in ado # This is the commit message #14: fix packages # This is the commit message #16: add playground # This is the commit message #18: fix desktop # This is the commit message #19: fix test restore # This is the commit message #20: Remove Microsoft.WinUI from packages # This is the commit message #21: fix merge # This is the commit message #23: .npmignore # This is the commit message #24: more npmignore # This is the commit message #25: re-enable force restore for csproj files # This is the commit message #26: merge fix # This is the commit message #30: get better msbuildprops fixes # This is the commit message #32: delete chakra # This is the commit message #33: remove unecessary changes # This is the commit message #34: more cleanup # This is the commit message #35: more cleanup 3 # This is the commit message #36: Delete vnext/PropertySheets/Nuget.LockFile.props # This is the commit message #37: fix # This is the commit message #38: fix
jonthysell
force-pushed
the
nugetlockfiles
branch
from
September 11, 2024 22:59
3660f32
to
46d8625
Compare
jonthysell
added a commit
that referenced
this pull request
Sep 12, 2024
This PR backports #13665 to 0.75. ## Description This PR fixes the two issues with `run-windows --msbuildprops` 1. When passing nothing, the command should not error and exit 2. When the string is parsed into key/value pairs, do not add empty keys to the msbuild command (which will cause msbuild to fail) ### Type of Change - Bug fix (non-breaking change which fixes an issue) ### Why Ran into these issues while working on PR #13634, extracted them as general bug fixes here. ### What See above. ## Screenshots N/A ## Testing Verified running `run-windows` with malformed `--msbuildprops` no longer errors. ## Changelog Should this change be included in the release notes: _yes_ [0.75] Fix parsing of empty build props in run-windows
jonthysell
added a commit
to jonthysell/react-native-windows
that referenced
this pull request
Sep 12, 2024
…er build (microsoft#13669) ## Description Fixes the task which checked for changed `packages.lock.json` files so that it actually detects changes in the files. ### Type of Change - Bug fix (non-breaking change which fixes an issue) ### Why To get more warnings when a forced NuGet restore has changed the lock file. Extracted from PR microsoft#13634 ### What See above. ## Screenshots N/A ## Testing N/A ## Changelog Should this change be included in the release notes: _no_
jonthysell
added a commit
that referenced
this pull request
Sep 13, 2024
This PR backports #13669 and #13684 to 0.75 # Fix msbuild-sln.yml detection of changed packages.lock.json files after build (#13669) ## Description Fixes the task which checked for changed `packages.lock.json` files so that it actually detects changes in the files. ### Type of Change - Bug fix (non-breaking change which fixes an issue) ### Why To get more warnings when a forced NuGet restore has changed the lock file. Extracted from PR #13634 ### What See above. ## Screenshots N/A ## Testing N/A ## Changelog Should this change be included in the release notes: _no_ # Fix CLI init args to prevent non-blocking errors (#13684) ## Description Changed our creation of new RN projects via the CLI to: * Be verbose for better debugging * Not automatically install ios pods (we don't need them) * Not call yarn install (it fails sometimes due to yarn version mismatches, we call `yarn install` later anyway) * No create a git repo (unnecessary for our tests) ### Type of Change - Bug fix (non-breaking change which fixes an issue) ### Why To unblock PRs. ### What See above. ## Screenshots N/A ## Testing Verified commands worked ## Changelog Should this change be included in the release notes: _no_ # fix old react-native-init.yml with new community cli command
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Type of Change
Erase all that don't apply.
Why
What is the motivation for this change? Add a few sentences describing the context and overall goals of the pull request's commits.
Resolves [Add Relevant Issue Here]
What
What changes were made to the codebase to solve the bug, add the functionality, etc. that you specified above.
Screenshots
Add any relevant screen captures here from before or after your changes.
Testing
If you added tests that prove your changes are effective or that your feature works, add a few sentences here detailing the added test scenarios.
Optional: Describe the tests that you ran locally to verify your changes.
Changelog
Should this change be included in the release notes: indicate yes or no
Add a brief summary of the change to use in the release notes for the next release.
Microsoft Reviewers: Open in CodeFlow