Skip to content
This repository was archived by the owner on Oct 5, 2022. It is now read-only.

haskell-build-backend for cabal (or possibly stack) support, and big code cleanup #91

Merged
merged 63 commits into from
Oct 1, 2015

Conversation

lierdakil
Copy link
Contributor

Request for comments

@lierdakil
Copy link
Contributor Author

I finally got around to implementing build target selection. I don't really like current interface for it though, but my ideas on improving it are extremely vague. Suggestions are welcome.

@edsko
Copy link

edsko commented Sep 7, 2015

Ok, have updated my branch and will start using it. Not sure that asking for the build target on every call is the right thing to do. I don't know if you think it will be too slow to call into Cabal when we initialize the project, but if we did that, you could show the list of targets alongside the various tabs at the top of the panel?

@lierdakil
Copy link
Contributor Author

There lies a problem: users can and will change cabal file after package is
initialized. I couldn't figure out an elegant solution for that in limited
time I had to work on it, so I used a "fallback" option for this for now.
If you have any suggestions, I'd love to hear those.

That said, I don't think that targets should be on output panel. If
possible, I'd prefer to get those into Haskell IDE → Select build target
menu or something along those lines.

2015-09-07 13:47 GMT+03:00 Edsko de Vries [email protected]:

Ok, have updated my branch and will start using it. Not sure that asking
for the build target on every call is the right thing to do. I don't know
if you think it will be too slow to call into Cabal when we initialize the
project, but if we did that, you could show the list of targets alongside
the various tabs at the top of the panel?


Reply to this email directly or view it on GitHub
#91 (comment)
.

Conflicts:
	lib/plugin-manager.coffee
@edsko
Copy link

edsko commented Sep 17, 2015

I take it it's not possible to dynamically construct the contents of the menu? As in, when the user requests the "Select build target" menu, at that point read the .cabal file? (I suppose this will certainly be possible if the options are not presented as submenu items.) Only danger here is that the user might select something, then change the .cabal file, and then end up with a target that doesn't exist anymore. I don't know if this is a huge deal.

@lierdakil
Copy link
Contributor Author

Dynamic construction is only available for context menu for some reason. If
I drop the menu idea, then it becomes somewhat easier, but I'm not exactly
sure what the alternative would be.
17 сент. 2015 г. 9:44 пользователь "Edsko de Vries" <
[email protected]> написал:

I take it it's not possible to dynamically construct the contents of the
menu? As in, when the user requests the "Select build target" menu, at that
point read the .cabal file? (I suppose this will certainly be possible
if the options are not presented as submenu items.) Only danger here is
that the user might select something, then change the .cabal file, and
then end up with a target that doesn't exist anymore. I don't know if this
is a huge deal.


Reply to this email directly or view it on GitHub
#91 (comment)
.

@edsko
Copy link

edsko commented Sep 17, 2015

Perhaps the current solution would be okay, if the most recently used option would always be at the top.

@lierdakil
Copy link
Contributor Author

Okay, I think I have arrived at something more or less satisfactory with this by separating target selection from build command.

This is starting to look somewhat decent.

I also added a hack to language-haskell that should help with atom/atom#8313, which doesn't seem to be going anywhere right now...

I'm thinking about releasing this sooner rather than later. Do you think ide-haskell-cabal is somewhat ready for this? Documentation is certainly lacking...

@edsko
Copy link

edsko commented Sep 30, 2015

Well I'm using this every day with ide-haskell-cabal and it seems to be stable. What kind of documentation do we need?

@lierdakil
Copy link
Contributor Author

Some explaination about using multiple ghc versions in readme might be nice, since that's not an immediately obvious feature, IMO.

@edsko
Copy link

edsko commented Sep 30, 2015

So I leave my editor occupy half my screen with (the other half has my irc client and my console). In the latest HEAD the layout is too wide (unnecessarily so, I think). Before calling build:

screen shot 2015-09-30 at 08 09 10

After calling build:

screen shot 2015-09-30 at 08 09 30

@edsko
Copy link

edsko commented Sep 30, 2015

@lierdakil Added some basic docs atom-haskell/ide-haskell-cabal@866f95a

@lierdakil
Copy link
Contributor Author

Okay, fiddled around with css, hopefully last version is better.

@edsko
Copy link

edsko commented Sep 30, 2015

Looks good.

lierdakil added a commit that referenced this pull request Oct 1, 2015
haskell-build-backend for cabal (or possibly stack) support, and big code cleanup
@lierdakil lierdakil merged commit 14efbdc into master Oct 1, 2015
@lierdakil lierdakil changed the title [WIP] haskell-build-backend for cabal (or possibly stack) support, and big code cleanup haskell-build-backend for cabal (or possibly stack) support, and big code cleanup Oct 1, 2015
@lierdakil
Copy link
Contributor Author

Merged and released yesterday. Seems to be doing okay for now.

@lierdakil lierdakil deleted the build-backend branch October 2, 2015 07:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants