-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Merge main to main-vs-deps #54189
Merged
Merged
Merge main to main-vs-deps #54189
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
…e-generators Merge master to features/source-generators
…e-generators Merge master to features/source-generators
…e-generators Merge master to features/source-generators
…e-generators Merge master to features/source-generators
…e-generators Merge master to features/source-generators
…e-generators Merge master to features/source-generators
…e-generators Merge master to features/source-generators
…e-generators Merge master to features/source-generators
…e-generators Merge master to features/source-generators
…e-generators Merge master to features/source-generators
…e-generators Merge master to features/source-generators
…e-generators Merge master to features/source-generators
…e-generators Merge master to features/source-generators
…e-generators Merge master to features/source-generators
…e-generators Merge master to features/source-generators
…e-generators Merge master to features/source-generators
…e-generators Merge master to features/source-generators
…e-generators Merge master to features/source-generators
…e-generators Merge master to features/source-generators
…e-generators Merge master to features/source-generators
…e-generators Merge master to features/source-generators
…e-generators Merge master to features/source-generators
…e-generators Merge master to features/source-generators
…e-generators Merge master to features/source-generators
…e-generators Merge master to features/source-generators
…e-generators Merge master to features/source-generators
…e-generators Merge master to features/source-generators
…e-generators Merge master to features/source-generators
…e-generators Merge master to features/source-generators
…e-generators Merge master to features/source-generators
* Implement discriminated union inside nodestatetable * Don't require registration for output nodes * Fix syntax nodes with comparers, and add tests
…e-generators Merge 16.11 into source generators
* Address some proto comments * Rename IsCompacted/Compact -> Cached/AsCached * Allow a join node to support comparison * Clean up modify for join node * Clear out the state table state when there are no drivers * Add hintName to exceptions * Remove IsFaulted and just handle syntax node specially * Address remaining prototype comments * Update tests to validate exception messages * Fix missing else * Remove assert * Test for join comparer * Typo * Use TestOptions.RegularPreview
* Duplicate post init context Remove cancellation token from init * Flatten sources onto execution context * Rename to IncrementalValueProvider * Rename syntax inputs * Feedback from API review round 1 * Rename Associate type params Add transform helper * WIP * Associate => Combine * Use TestOptions.RegularPreview * Fixup after rebase * Rename to combineNode * Move generateSource -> context.RegisterSourceOutput * AsSingleValue -> Collect * Make each lambda take a cancellation token * Apply suggestions from code review Co-authored-by: Jared Parsons <jaredpparsons@gmail.com> * PR Feedback - Ensure cancellation and add some extra tests to cover * PR feedback, restore postinit cancellation token * Fix typo * Fix formatting Co-authored-by: Jared Parsons <jaredpparsons@gmail.com>
* Add more comments * Make ICompilationFactoryService.CreateGeneratorDriver non-null returning This was null-returning originally because generators were a preview feature and we didn't want to create GeneratorDrivers when the preview feature was disabled. Then we used kept it when C# had generators but not VB. At this point any language that creates Compilations always creates generators, so we can simplify. * Ensure we only create one AdditionalText per underlying state We're going to need to be managing instances more carefully, so keep a 1:1 mapping between them. A ConditionalWeakTable here isn't the best way to be doing this, since we own the type that's the key, but our inheritance structure is a bit odd: TextDocumentState is used as a base type for some things (like regular files) but is also used directly as a type for additional files. We really should introduce a new derived type to directly represent additional files, but that's a more invasive change. * Switch one of our test generators over to be an incremental generator * Hold onto and reuse GeneratorDrivers Right now we were simply creating a new GeneratorDriver every time we needed to run generators; now that the compiler supports an incremental API we need to hold onto the GeneratorDriver between runs so it can cache inputs smartly. For the most part the change is simple: we simply hold onto the GeneratorDriver once we're done running generators, and just give it a new compilation when we want to incrementally run. The only real "tricky" bit is there are some pieces of state that aren't held by the compiler, but rather by the GeneratorDriver itself, namely: 1. The list of generators to themselves. 2. The list of additional files -- that's simply not held by a Compilation at all. 3. The parse options that's used for parsing generated files -- you can't get ParseOptions from the CompilationOptions. 4. The parsed .editorconfigs. These are precisely the same pieces of state that are passed to GeneratorDriver.Create when we initially create one. For these pieces of state, if they're changing we need to also update the GeneratorDriver itself with the APIs that exist on GeneratorDriver along when we incrementally update a Compilation. To do this we transform the GeneratorDriver the same way we do a Compilation through in-progress states. Currently, there's some APIs missing on the GeneratorDriver API, so sometimes we just drop the driver entirely which will force a rerun from scratch after those happen. * Pass through generator cancellation token * Use 'context' naming convention from analyzers * Add NOP incremental generator test case * Fix tests * Update to new API Co-authored-by: Sam Harwell <Sam.Harwell@microsoft.com> Co-authored-by: Chris Sienkiewicz <chsienki@microsoft.com>
Update features/source-generators to main
Update features/source generators to main
Merge features/source generators into main
Avoid locks on highly parallel paths in VisualStudioWorkspaceImpl
ghost
approved these changes
Jun 17, 2021
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.
Auto-approval
ghost
added this to the Next milestone
Jun 18, 2021
ghost
deleted the
merges/main-to-main-vs-deps
branch
June 18, 2021 22:43
This pull request was closed.
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.
This is an automatically generated pull request from main into main-vs-deps.
Once all conflicts are resolved and all the tests pass, you are free to merge the pull request. 🐯
Troubleshooting conflicts
Identify authors of changes which introduced merge conflicts
Scroll to the bottom, then for each file containing conflicts copy its path into the following searches:
Usually the most recent change to a file between the two branches is considered to have introduced the conflicts, but sometimes it will be necessary to look for the conflicting lines and check the blame in each branch. Generally the author whose change introduced the conflicts should pull down this PR, fix the conflicts locally, then push up a commit resolving the conflicts.
Resolve merge conflicts using your local repo
Sometimes merge conflicts may be present on GitHub but merging locally will work without conflicts. This is due to differences between the merge algorithm used in local git versus the one used by GitHub.
git fetch --all git checkout merges/main-to-main-vs-deps git reset --hard upstream/main-vs-deps git merge upstream/main # Fix merge conflicts git commit git push upstream merges/main-to-main-vs-deps --force