-
Notifications
You must be signed in to change notification settings - Fork 352
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
Add advanced range-based platform version predicates #285
Conversation
Yes! That looks really beautiful 👌 But looks hard to maintain for you 😁 |
Brilliant, glad we found the sweet spot. And maintenance is not a problem, that's what I'm here for 😄 I'll polish this branch over the weekend and probably merge by Monday. |
Self(versions, matches: \.isCurrent) | ||
} | ||
|
||
@_spi(Advanced) |
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 guess the question is... should we still gate these? Maybe not 🤔
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 decided to keep it, and will also rename existing @_spi(Internals)
annotations to @_spi(Advanced)
in a separate PR, so everything is accessible from a single entry point. "Advanced" is also a better name than "Internals" because it denotes intent ("Advanced Mode").
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.
Sry for the late reply! I definitely think Advanced
is such a better name. Internal really gives me "not intended for use" vibes.
With that convention I would say it encourages more advanced people to use it actually.
(Internal
also made me a bit unsure initially and hence the question in #280)
Some feature requests popped up yesterday so I'll merge this now and get a 0.8.0 release going later today. |
This is a different take on #284 without overloading the
introspect
modifier, as suggested by @paescebu.It reads quite clean, though it's a tiny bit more obscure to find (which might be a good thing, really), and it allows mixing current + current and past matching all in the same expression (which again, might be a good thing).
Examples: