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
"option -p: Could not parse pattern" when the pattern contains a minus sign in it #220
Comments
Try
|
Perhaps |
Thanks for the very quick response, I had read the docs but somehow missed that part. I am happy enough with the forward slashes. |
Oh, I spoke too early. When I try another pattern with forward slashes, the meaning seems to change. The docs say "-p foo is a shortcut for -p /foo/" but they don't seem to do the same thing if the pattern itself contains a forward slash. In my example, So if there is both a forward slash and a minus sign in a pattern there is no way of passing it in verbatim, as far as I can see? Alternatively, is there a way to escape the minus sign for the pattern in the original post? |
Hmm, yeah, I shouldn't include The correct pattern (after I fix this bug) should be |
I think my original reasoning for including If you only use But it's better to be consistent with |
I removed |
I am not sure how to depend on the repository version using stack, sorry. If the two examples I gave above (type-checking and issues/390) work, then I am happy. |
See https://docs.haskellstack.org/en/stable/yaml_configuration/#git-and-mercurial-repos
type-checking now works both as |
Oh I didn't know the subdirs field, that works now.
Are you sure about this change? Because I assume people would be using the likes of |
Oh yeah, I forgot about An alternative would be to change the field separator to something else, like |
Personally I would be wary of breaking the existing /-patterns. What's wrong with allowing both - and / in raw patterns? |
As you yourself pointed out,
This is because the surrounding slashes in |
Of course, you are right. Would requiring characters like - to be escaped (maybe with a ) be an option? Either way, now that I think about this again, using / to mean two different things (field separator and the /.../ syntax) seems like asking for trouble/confusion. A different field separator (despite being backwards incompatible) may help as you suggest. |
The interpretation of |
Resolved in tasty 1.1; see the changelog. |
Thanks! |
This used to work before the new pattern language of 1.0:
-p type-checking
. Now it gives the following error message:option -p: Could not parse pattern
.Is there a suggested way of rewriting this pattern, or should I rename my tests to not include minus signs in them?
Thanks!
The text was updated successfully, but these errors were encountered: