You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
then valid package name foo and version range -any && >= 1 can be combined into
foo-any && >= 1
which isn't valid.
Yet, foo>=1 is valid (and often used).
Alternatively we can specify that space is mandatory before -any and -none tokens, that will make grammar less compositional.
TLDR; make version-range syntax so it cannot be interpretted as part of UnqualComponentName. Simplest solution is to require VersionRange to start with character not allowed in UnqualComponentName.
The text was updated successfully, but these errors were encountered:
I can't think of a good reason to keep -none or -any (even though I've certainly used -none in cabal.project/freeze files); the only reason I could think of is if we could give -none or -any some additional connotation beyond the semantics of <0 and >=0 that would make a difference for linters (such as cabal check) to signal intent; but then again I don't have a good use-case for that OTTOMH.
They make version grammar non-declarative.
If we have grammar for
Dependency
asthen valid package name
foo
and version range-any && >= 1
can be combined intowhich isn't valid.
Yet,
foo>=1
is valid (and often used).Alternatively we can specify that space is mandatory before
-any
and-none
tokens, that will make grammar less compositional.TLDR; make version-range syntax so it cannot be interpretted as part of
UnqualComponentName
. Simplest solution is to requireVersionRange
to start with character not allowed inUnqualComponentName
.The text was updated successfully, but these errors were encountered: