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

Enforce restrictions on selector expression per spec, fixes #416 #417

Merged
merged 1 commit into from
Aug 5, 2019

Conversation

Pike
Copy link
Contributor

@Pike Pike commented Aug 5, 2019

This uplifts the tests from the spec PR,
projectfluent/fluent#280
and implements the selector validation to follow what abstract.js
does in the spec.

I didn't invest too much thinking in the error message. I filed #402 to rephrase our error messages to be constructive, at which point all the 4 error messages would collapse to one, describing what's actually a valid selector.

@zbraniecki also putting this into your review queue. I went ahead and did this PR as well to contextualize the spec one. Once we have those two, I'll file issues on rust and python.

@Pike Pike requested a review from zbraniecki August 5, 2019 10:14
@Pike Pike self-assigned this Aug 5, 2019
…uent#416

This uplifts the tests from the spec PR,
projectfluent/fluent#280
and implements the selector validation to follow what `abstract.js`
does in the spec.

In @fluent/bundle, the invalid selectors are just accepted.
Might be worth revisiting.
Copy link
Collaborator

@zbraniecki zbraniecki left a comment

Choose a reason for hiding this comment

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

lgtm!

@Pike Pike merged commit 4312437 into projectfluent:master Aug 5, 2019
@Pike Pike deleted the fix-selector-expressions branch August 5, 2019 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants