Skip to content
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 into features/list-patterns #55072

Merged
merged 2,003 commits into from
Jul 24, 2021
Merged

Conversation

alrz
Copy link
Contributor

@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
Copy link
Contributor 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
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
Contributor 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
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
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
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
Contributor 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
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
Contributor 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
Contributor 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
@@ -8051,7 +8051,7 @@ private BoundExpression BindIndexedPropertyAccess(SyntaxNode syntax, BoundExpres
argIsIndex
? ErrorCode.ERR_ImplicitIndexIndexerWithName
: ErrorCode.ERR_ImplicitRangeIndexerWithName,
arguments.Names[0].GetLocation());
arguments.Names[0].GetValueOrDefault().Location);
Copy link
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
Contributor Author

Choose a reason for hiding this comment

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

Copy link
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
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
Contributor 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
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
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.