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

"stack new" allows invalid package names #1336

Closed
mgsloan opened this issue Nov 12, 2015 · 0 comments · Fixed by #1338
Closed

"stack new" allows invalid package names #1336

mgsloan opened this issue Nov 12, 2015 · 0 comments · Fixed by #1338

Comments

@mgsloan
Copy link
Contributor

mgsloan commented Nov 12, 2015

Repro:

  1. stack new "1234-abc"

  2. Fails to initialize a stack.yaml due to Unable to parse cabal file /home/mgsloan/fpco/stack/1234-abc/1234-abc.cabal: NoParse "name" 1

Looks like the packageNameParser doesn't restrict package names enough. From the cabal users guide:

A package is identified by a globally-unique package name, which consists of one or more alphanumeric words separated by hyphens. To avoid ambiguity, each of these words should contain at least one letter.

@mgsloan mgsloan added this to the P2: Should milestone Nov 12, 2015
kadoban added a commit to kadoban/stack that referenced this issue Nov 12, 2015
The Cabal rule that each alphanumeric "word" between hyphens must include at
least one letter is now enforced.

fixes commercialhaskell#1336
kadoban added a commit to kadoban/stack that referenced this issue Nov 25, 2015
kadoban added a commit to kadoban/stack that referenced this issue Nov 28, 2015
kadoban added a commit to kadoban/stack that referenced this issue Dec 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant