Skip to content

Merge main into features/list-patterns#55072

Merged
jcouv merged 2003 commits intodotnet:features/list-patternsfrom
alrz:list-merge
Jul 24, 2021
Merged

Merge main into features/list-patterns#55072
jcouv merged 2003 commits intodotnet:features/list-patternsfrom
alrz:list-merge

Conversation

@alrz
Copy link
Copy Markdown
Member

@alrz alrz commented Jul 23, 2021

# Conflicts:
#	src/Compilers/CSharp/Portable/Binder/Binder_Expressions.cs
#	src/Compilers/CSharp/Portable/Binder/Binder_Patterns.cs
#	src/Compilers/CSharp/Portable/Errors/MessageID.cs
#	src/Compilers/CSharp/Portable/FlowAnalysis/DefiniteAssignment.cs
#	src/Compilers/CSharp/Portable/Lowering/LocalRewriter/LocalRewriter.cs
#	src/Compilers/CSharp/Portable/Lowering/LocalRewriter/LocalRewriter_AssignmentOperator.cs
#	src/Compilers/CSharp/Portable/Lowering/LocalRewriter/LocalRewriter_Call.cs
#	src/Compilers/CSharp/Portable/Lowering/LocalRewriter/LocalRewriter_FunctionPointerInvocation.cs
#	src/Compilers/CSharp/Portable/Lowering/LocalRewriter/LocalRewriter_IndexerAccess.cs
#	src/Compilers/CSharp/Portable/Lowering/LocalRewriter/LocalRewriter_ObjectOrCollectionInitializerExpression.cs
#	src/Compilers/CSharp/Portable/PublicAPI.Unshipped.txt
#	src/Compilers/CSharp/Portable/xlf/CSharpResources.cs.xlf
#	src/Compilers/CSharp/Portable/xlf/CSharpResources.de.xlf
#	src/Compilers/CSharp/Portable/xlf/CSharpResources.es.xlf
#	src/Compilers/CSharp/Portable/xlf/CSharpResources.fr.xlf
#	src/Compilers/CSharp/Portable/xlf/CSharpResources.it.xlf
#	src/Compilers/CSharp/Portable/xlf/CSharpResources.ja.xlf
#	src/Compilers/CSharp/Portable/xlf/CSharpResources.ko.xlf
#	src/Compilers/CSharp/Portable/xlf/CSharpResources.pl.xlf
#	src/Compilers/CSharp/Portable/xlf/CSharpResources.pt-BR.xlf
#	src/Compilers/CSharp/Portable/xlf/CSharpResources.ru.xlf
#	src/Compilers/CSharp/Portable/xlf/CSharpResources.tr.xlf
#	src/Compilers/CSharp/Portable/xlf/CSharpResources.zh-Hans.xlf
#	src/Compilers/CSharp/Portable/xlf/CSharpResources.zh-Hant.xlf
#	src/Compilers/Test/Utilities/CSharp/TestOptions.cs

@alrz alrz closed this Jul 23, 2021
@alrz alrz reopened this Jul 23, 2021
@alrz
Copy link
Copy Markdown
Member Author

alrz commented Jul 23, 2021

@jcouv I've had already started attempting a merge. Feel free to close if you're half way through.

@jcouv
Copy link
Copy Markdown
Member

jcouv commented Jul 23, 2021

Cool! There were more merge conflicts than I expected, so I'm glad you took a stab :-)

@alrz
Copy link
Copy Markdown
Member Author

alrz commented Jul 23, 2021

Most of it is a removed unused arg which I regret doing it in this branch.
I listed conflicted files if you wanted to review.

@jcouv
Copy link
Copy Markdown
Member

jcouv commented Jul 23, 2021

The only trouble is that we can't really review this PR as-is, as the merge conflicts are lost into the merge commit.
For situations where the merge isn't trivial (simple additive merges) we prefer to resolve all the conflicts in a separate commit which can be reviewed.

I think it's possible to re-do this with miminal effot:

  • re-do a merge without resolving conflicts (ie. commit the conflict markers)
  • use the last commit of this PR to update the files in your workspace to resolve conflicts again, commit that as the commit for resolving conflicts

@jcouv
Copy link
Copy Markdown
Member

jcouv commented Jul 23, 2021

I listed conflicted files if you wanted to review.

Okay. I think that works too. I'll take a look that way

@jcouv
Copy link
Copy Markdown
Member

jcouv commented Jul 23, 2021

I listed conflicted files if you wanted to review.

Actually that doesn't work :-/ GitHub won't let me jump to a specific file, because too many files changed...

@alrz
Copy link
Copy Markdown
Member Author

alrz commented Jul 23, 2021

I did a clean merge with "theirs" option to see the diff: https://github.com/dotnet/roslyn/compare/1cfbd6dc..81d9c767

Does that help?

@jcouv
Copy link
Copy Markdown
Member

jcouv commented Jul 23, 2021

Does that help?

I'm not sure.
What are the two commits in https://github.com/dotnet/roslyn/compare/1cfbd6dc..81d9c767 ? Neither appears in this PR.

I'd still recommend the approach I described earlier. It is tried and tested (one merge commit keeping conflicts, one commit to resolve conflicts).

@alrz
Copy link
Copy Markdown
Member Author

alrz commented Jul 23, 2021

What are the two commits in https://github.com/dotnet/roslyn/compare/1cfbd6dc..81d9c767 ? Neither appears in this PR.

81d9c76 is the merge with manually resolved conflicts (I do see this in the PR)
1cfbd6d is the clean merge from main with all conflicts resolved to main (by -Xtheirs)

The diff basically gives you all manual changes.

alrz added 4 commits July 23, 2021 23:08
# Conflicts:
#	src/Compilers/CSharp/Portable/Binder/Binder_Expressions.cs
#	src/Compilers/CSharp/Portable/Binder/Binder_Patterns.cs
#	src/Compilers/CSharp/Portable/Errors/MessageID.cs
#	src/Compilers/CSharp/Portable/FlowAnalysis/DefiniteAssignment.cs
#	src/Compilers/CSharp/Portable/Lowering/LocalRewriter/LocalRewriter.cs
#	src/Compilers/CSharp/Portable/Lowering/LocalRewriter/LocalRewriter_AssignmentOperator.cs
#	src/Compilers/CSharp/Portable/Lowering/LocalRewriter/LocalRewriter_Call.cs
#	src/Compilers/CSharp/Portable/Lowering/LocalRewriter/LocalRewriter_FunctionPointerInvocation.cs
#	src/Compilers/CSharp/Portable/Lowering/LocalRewriter/LocalRewriter_IndexerAccess.cs
#	src/Compilers/CSharp/Portable/Lowering/LocalRewriter/LocalRewriter_ObjectOrCollectionInitializerExpression.cs
#	src/Compilers/CSharp/Portable/PublicAPI.Unshipped.txt
#	src/Compilers/CSharp/Portable/xlf/CSharpResources.cs.xlf
#	src/Compilers/CSharp/Portable/xlf/CSharpResources.de.xlf
#	src/Compilers/CSharp/Portable/xlf/CSharpResources.es.xlf
#	src/Compilers/CSharp/Portable/xlf/CSharpResources.fr.xlf
#	src/Compilers/CSharp/Portable/xlf/CSharpResources.it.xlf
#	src/Compilers/CSharp/Portable/xlf/CSharpResources.ja.xlf
#	src/Compilers/CSharp/Portable/xlf/CSharpResources.ko.xlf
#	src/Compilers/CSharp/Portable/xlf/CSharpResources.pl.xlf
#	src/Compilers/CSharp/Portable/xlf/CSharpResources.pt-BR.xlf
#	src/Compilers/CSharp/Portable/xlf/CSharpResources.ru.xlf
#	src/Compilers/CSharp/Portable/xlf/CSharpResources.tr.xlf
#	src/Compilers/CSharp/Portable/xlf/CSharpResources.zh-Hans.xlf
#	src/Compilers/CSharp/Portable/xlf/CSharpResources.zh-Hant.xlf
#	src/Compilers/Test/Utilities/CSharp/TestOptions.cs
@alrz
Copy link
Copy Markdown
Member Author

alrz commented Jul 23, 2021

I'd still recommend the approach I described earlier. It is tried and tested (one merge commit keeping conflicts, one commit to resolve conflicts).

Done.

@alrz alrz marked this pull request as ready for review July 23, 2021 19:17
@alrz alrz requested review from a team as code owners July 23, 2021 19:17
@alrz alrz requested a review from a team July 23, 2021 19:17
? ErrorCode.ERR_ImplicitIndexIndexerWithName
: ErrorCode.ERR_ImplicitRangeIndexerWithName,
arguments.Names[0].GetLocation());
arguments.Names[0].GetValueOrDefault().Location);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is a null location what we want for the OrDefault case, as opposed to Location.None?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks

=======
public static readonly CSharpParseOptions RegularWithExtendedPropertyPatterns = RegularPreview;
>>>>>>> origin/main
public static readonly CSharpParseOptions RegularWithListPatterns = RegularPreview;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: this shouldn't be necessary anymore. The default version for all tests has been changed to preview.
Only LangVer tests will have to do something explicit (using RegularN for old and TemporaryPreview LangVer for new). TemporaryPreview will be replaced by RegularN+1 when the new language version is introduced.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The default version for all tests has been changed to preview.

Good to know. I can remove in some other PR (existing or upcoming) if that's ok.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If you'd like. This is just something to know moving forward. Hopefully it should be a simplification.

Copy link
Copy Markdown
Member

@jcouv jcouv left a comment

Choose a reason for hiding this comment

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

Thanks much for restructuring the PR. It was much easier to review that way.
Looks good, just a question on possible null Location.

@jcouv jcouv merged commit 2f1f839 into dotnet:features/list-patterns Jul 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.