-
-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
idris: install using haskell-stack #1630
Conversation
👍 |
@MikeMcQuaid That would be lovely, but I expect it to fail. I want to see it fail on CI not just locally, to rule out any local issues. However, I'm experimenting locally with a stack-based workaround. |
Yup, same failure as I get locally:
|
Stack-based workaround installs and passes the test:
|
@MikeMcQuaid I've updated the PR with the Also, CC @zmwangx and @borsboom (RE: commercialhaskell/stack#848) |
mkdir_p bin | ||
system "stack", "install", "--local-bin-path=#{bin}" | ||
|
||
install_dir = libexec/"stack/.stack-work/install/x86_64-osx/lts-5.11/7.10.3" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is why we need stack install --prefix
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indeed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
install_dir = IO.popen("stack path --local-install-root") { |io| io.gets.chomp }
or
install_dir = `stack path --local-install-root`.chomp
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
install_dir = Utils.popen("stack path --local-install-root").chomp
You might want to use the output of It looks like you're copying out of the |
Good idea.
Pretty please, with sugar on top.
It is, which is why I had to leave the
Nice! Do you happen to have a link? |
Woo hoo 🍏 |
system "stack", "setup" | ||
system "stack", "build" | ||
|
||
mkdir_p bin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tiniest nit that normally we go for bin.mkpath
Tiny nits otherwise 👍 |
@MikeMcQuaid Sweet. |
@MikeMcQuaid Also, we can optionally make the |
- use haskell-stack to build idris to work around GHC 8 incompatibility - minor style changes to the test-do block Issue Homebrew#1486.
@DomT4 Any changes desired? |
@MikeMcQuaid any thoughts on #1630 (comment)? I don't know if there's any precedent for a significant invisible dot directory that's actually installed within the Cellar, but I don't mind the |
@ilovezfs I think I'd rather it's not in the Cellar if possible? I'm not sure I understand the contents or purpose, though, so I'm lacking context currently. |
It's required that it be installed since it contains the installation directory ("work-dir" is somewhat of a misnomer, or at least an incomplete description). The core issue is that some paths can get hard coded (which they indeed do in the case of Idris), and the stack work-dir must be a subfolder of the directory in which you're building. It can have whatever name you'd like, but the default is |
I see, yuck. Normally I'm pretty 👎 on installation happening in the prefix but if it's unavoidable to fix up this package that's otherwise broken then a begruding 👍. I think in this case it's better to be a hidden/dotted work directory then, yeh. |
@MikeMcQuaid hehe. Yes indeed. That's why I flagged what's happening here with a neon sign for you! |
On the bright side, this is a proof-of-concept for using |
🚢 'd |
Issue #1486.