-
Notifications
You must be signed in to change notification settings - Fork 95
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
Allow multiple target-os #187
Allow multiple target-os #187
Conversation
Update not handling. Add flexi logger. Add additional target_os tests
5675bf4
to
3ed2ea7
Compare
3ed2ea7
to
134c2b1
Compare
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.
Everything looks good, just some leftover comments.
Maybe also worth mentioning in PR description that logging is improved
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.
Just noticed this bug is still occurring while testing locally. It appears like its illustrated in the tests too
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.
Overall looks nice! Mostly comments about making sure we leave ourselves a good record of how things work so that going forward we can maintain / improve these areas.
201ed86
to
f04d0e4
Compare
This reverts commit 3c1fcc0.
eec6dc6
to
53291ea
Compare
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.
There's been a lot of iteration on this PR, and I know the delay is frustrating. I definitely don't think we need to cover every possible edge case, however I do think it would be valuable—even if only for ourselves as future maintainers—to have a clear documentation of how the new flag works and why. That way, if we lose context but have to come back and re-evaluate, we can be more confident we're considering all of the cases that were originally considered.
if meta.path().is_ident("not") { | ||
debug!("encountered not"); | ||
scope = TargetScope::Reject | ||
} |
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.
Should this take into account the existing scope? I.e., if we're already in TargetScope::Reject
for this node, would not
turn that into TargetScope::Accept
? It's super edge-case since I don't know that someone would realistically do this, but how do we handle #[cfg(not(not(target_os = "ios")))]
?
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.
🤔
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.
LGTM! Thanks for going through all the iteration and for adding the docs 🎉
@@ -0,0 +1,87 @@ | |||
# Target OS |
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 fantastic, thank you! I love the use of examples to call out the behavior in the more complicated scenarios 🎉
Issue was a typo in a test case, which was resolved
--target-os
values.#[cfg(not(..))]
target_os parsing.println
eprintln
.To run the test and see the evaluation:
RUST_LOG=debug cargo t --all-features --test snapshot_tests excluded_by_target_os::typescript -- --nocapture