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
Scope tests #2053
Scope tests #2053
Changes from 72 commits
6ac7ea6
9bc6d8a
8326276
5feb0cf
6cd7cc0
eac4b30
fcef5ec
0348ae4
dde8a77
9f79367
33263bb
91a5fc2
9123d4b
ec2004c
a1e62ea
fcefb46
191454f
5814cd5
e3753b3
7dcde95
c5d8fdb
071e815
c6b8aaf
b756723
9965927
5e76ff0
1995cde
b93893e
f45a753
d5d4c28
473a084
ee9fa80
2f8dfa2
bf70406
bf5e187
f2b63d8
9f9de74
fc63d43
cbd156f
653354e
fee4588
1a96826
0e70883
ed21c4d
f783cb1
4c39f55
963675e
c5da832
ef8d452
66669f2
6c38cc3
eb348ba
2f51f65
459761c
c096e8a
ac90914
da04e03
637d8ea
aa05a65
4f703a4
35718a3
12e7588
b0f4fef
cca1d21
06d00b4
b8c2ade
5f1d178
93d36d0
b8a80a8
7adcef6
cfebfd9
72ef3f5
d427431
616988e
2d8c499
008f4ce
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.
this isn't true. JSX is valid in JS. Shall we just mark it unsupported / leave it undefined for now?
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 was thinking that we should test all jsx under javascriptreact and not javascript. I would leave it undefined if anything. Saying that it's unsupported is not true either.
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.
Hmm. Probably fine for now. At some point we should prob figure out how to automatically run tests for all langs where they're applicable, eg run our js tests in ts, etc. We could maybe make subsets of languages and then define a way to import tests from one language to another. But we can do that in a follow-up
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.
As in other examples, this would be more helpful if there were a way to put it in context, but a flat string is not a particularly comfortable way to do that
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.
Absolutely.
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.
These labels feel kinda useless / arbitrary and a bit redundant with the description. I wonder if we just autogenerate these from the id like we do for human-readable scope types. Ie
key.mapPair
=>"key (map pair)"
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.
Sounds good to me
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 shouldn't include the curly brackets, but then it becomes pretty unclear what's going on here. I guess we could use multiple?
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.
The examples are not the content range. It's just example of the type of code that would have this facet
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 do feel like all of these could be their own fine-grained scope. I wonder if we think about moving in that direction sooner rather than later
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 don't quite follow what you're suggesting? What exactly do you want to make more fine grained? I definitely prefer them fine grained
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.
Eg
key.mapPair
,key.attribute
, etc could all be their own scopes. I think every facet here should probably just be a new fine-grained scope. Not something to change for this PR just an observation. Makes me question the notion of facets entirely, but they're undoubtedly a step forward so nothing to get in the way of this PRThere 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.
Totally agree
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.
What's going to happen when we want to test "round"? That's not a simple scope type
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 just copied the interface from your issue. We can make it a scope type instead?
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.
Maybe ok for the time being. I wonder if we create a utility function to make it more ergonomic once we need to support complex scopes.
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.
These examples are pretty misleading. If we're going to take the example thing seriously, we need to figure out a way to demarcate substrings. I do question how useful / ergonomic it is to just drop these examples into strings. The examples from test casees are already there and likely to be far more useful
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 was thinking examples as a very general guide. If you want details you she'd look at the actual fixtures
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 is unhelpful in the other direction. Really questioning the utility of these examples 🤔
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.
If you don't like them we can't ditch them