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 build gives InvalidAbsDir #2614

Closed
dtaskoff opened this issue Sep 20, 2016 · 6 comments
Closed

stack build gives InvalidAbsDir #2614

dtaskoff opened this issue Sep 20, 2016 · 6 comments

Comments

@dtaskoff
Copy link

dtaskoff commented Sep 20, 2016

I just updated to stack 1.2.0
and my stack build is failing with the following error:
option --extra-lib-dirs: InvalidAbsDir "/home/me/XX/YY/../ZZ/UU/VV/WW"

The command I'm running is
stack build --extra-lib-dirs="$lib"
where $lib is the path mentioned above.

Note: The same command ran successfully before the update.

Edit: Seems like it's failing because of the .., since given the same path without it works perfectly fine.

@mgsloan
Copy link
Contributor

mgsloan commented Oct 6, 2016

Not sure what we should do about this. I think this general issue affects everything that uses the functions like absDirOption / relDirOption / etc.

@chrisdone Maybe we should put FilePath in our config types? Seems like a cop-out! Or, relax the constraints of the path library? (dangerous semantics change, though!). Perhaps Path needs more types?

@chrisdone
Copy link
Member

It's true that fundamentally a user's input is incomplete and we need IO to fill in the gaps. Ideally we'd resolve the user input into a normalised absolute directory, via resolveDir' from path-io. I don't know whether optparse-applicative is capable of running as a monad transformer like Web formlets, that would allow us to do the resolving before it gets into our configuration types.

What type would this be?

@mgsloan
Copy link
Contributor

mgsloan commented Oct 8, 2016

I'm not sure, how about LenientPath Dir ?

@dtaskoff
Copy link
Author

dtaskoff commented Dec 15, 2016

Any updates on this?
The issue is still there, with the latest stack version - 1.3.0.

@dtaskoff
Copy link
Author

dtaskoff commented Apr 6, 2017

Is there any progress on that issue? Still happening with 1.4.0.

Note: Won't using something like that function fix the issue easily?

@mgsloan
Copy link
Contributor

mgsloan commented Apr 8, 2017

Fixed in HEAD - see #2830

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

3 participants