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.
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
Better anonymous record error reporting #15598
Better anonymous record error reporting #15598
Changes from 28 commits
b09d8dc
fec845b
229192e
80a3fdb
70c34d9
216a6e2
b075dbb
d528edc
8fa772e
9900e78
0aec3c0
b9213fc
f62fc28
3e9200b
f65c8c8
372c4c1
78297dc
3a629db
a13e971
73f3a9b
b1a4037
31b8222
d26aed5
adc45f1
1556f76
622f56f
4ef7e80
f16ef8e
53a9359
cd92b3c
1d111fb
2237714
6e8e08b
ccefaed
32f159a
29f757b
9480d75
f5f27af
468396f
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Imo the name of the anon record value should be the subject in this sentence.
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.
@T-Gro, probably "use the following syntax ... to update it"? My english is not that good, maybe @KathleenDollard can help us here?
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.
Happy to adjust the error message. I was hoping for an error message to be suggested :).
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.
Do we actually use term
Label
for record fields anywhere in the docs?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.
@auduchinok I will wait to see what is the final suggested message to update it :)
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.
In my initial implementation, I had the
Ident
name fromexpr
but as Eugene pointed out here. I was only checking for one specific shape of theSynExpr
and that will eliminate the error reporting for the rest of the cases where an anonymous record value can be obtained like from a property (x.Prop), a function call (f ()), an indexer (x.[0], or x[0]), etc.I think are more general approach needs to be used here so that is why I'm using
expr
Update: I'm happy to change the error message(based on not using the
Ident
name) to your suggestion if that is work for the teamThere 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.
I suppose we can say
This expression is an anonymous record, use {|...|} instead of {...}.
if the whole{ ... }
is underlined. I would prefer that over mentioning a particular field from the record. What do others think?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.
This PR uses a more accurate error range based on the annon record field that is being used.
Edit: Also this is what the issue that this PR tries to solve mentions #14814
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.
That doesn't seem very accurate to me, seeing that the fields have nothing to do with the error.
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.
I mean they are related as it is trying to update an annon record using the record syntax. and we now that because 2 of the fields belong to an annon record. ?
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.