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

Subsections in custom-setup #4286

Open
phadej opened this issue Jan 31, 2017 · 4 comments
Open

Subsections in custom-setup #4286

phadej opened this issue Jan 31, 2017 · 4 comments

Comments

@phadej
Copy link
Collaborator

phadej commented Jan 31, 2017

By reading http://cabal.readthedocs.io/en/latest/developing-packages.html#custom-setup-scripts it's not clear whether subsections e.g. if os(windows) are supported. IIRC they aren't, but IMHO it's good idea to explicitly mention this (and the reasoning behind).

Also: if such section is added, cabal crashes:

'parseField' called on a non-field. This is possibly a bug in Cabal.
Please report it to the developers:
https://github.com/haskell/cabal/issues/new
CallStack (from HasCallStack):
error, called at ./Distribution/PackageDescription/Utils.hs:21:16 in

(I'm not sure what parsec variant does).

@23Skidoo
Copy link
Member

I think the idea was to make custom-setup as simple as possible, so it's probably deliberate, but the error message should be improved.

/cc @dcoutts

@phadej
Copy link
Collaborator Author

phadej commented Jan 31, 2017

FWIW: I guess it should crash, but (and) parser should warn about this. I can look into the code issue, but I don't know about the reasons to improve the documentation.

@ezyang
Copy link
Contributor

ezyang commented Jan 31, 2017

See also #4047 which is a proposal to allow a custom setup to be an external executable, in which case the current setup stanza restrictions do not apply. CC @Ericson2314

@grayjay
Copy link
Collaborator

grayjay commented Dec 4, 2017

#3085 (comment) and #4852 are related.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants