-
Notifications
You must be signed in to change notification settings - Fork 843
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
Specify intra-package target (like 'cabal build COMPONENTS') #201
Comments
Worth exploring, but we may be constrained by what Cabal allows us to do here. If anyone has experience with Cabal on this front, please speak up. |
+1 if it doesn't get ornate or complicated. I don't have a lot to contribute re: Cabal. I've gotten away with specifying specific suites/stanzas by name, cabal test, and cabal build without needing much else so far. |
Gah, I can't believe I never realized that you can just pass in the components to |
Fwiw, in my example "exe:Snowdrift" is the component (not 'component:package' — just 'component'). If we tacked package on to that, it would be Snowdrift:exe:Snowdrift. That's why I hoped it wouldn't be hard to add a heuristic to figure out which package a particular component belonged to, so one could simply specify a component by itself. Of course, Snowdrift:exe:Snowdrift would be an acceptable first pass. |
Is the |
In this case the choices are exe:Snowdrift and lib:Snowdrift. |
@chreekat This is now implemented. This does require prefixing the component name with the package name (doing otherwise would have led to ambiguities with the current syntax). This, for example, works:
Can you try it out? |
Looks good |
FYI, with the latest stack, running |
Great! |
For reference I will point to #1406 (stack 0.1.8 lost ability to build individual executables or library) so other people will realise faster that they are not idiots, and that this feature is just not working right now. |
This may fit in with the talk of building test suites somewhat independently of a project itself.
Suggest keeping
stack build TARGET
syntax, just making TARGET more flexible — So I can do any ofMay be slightly ambiguous, but I doubt that would be a problem very often.
The text was updated successfully, but these errors were encountered: