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

Run with bazel built idris projects #222

Open
shmish111 opened this issue Dec 12, 2018 · 4 comments
Open

Run with bazel built idris projects #222

shmish111 opened this issue Dec 12, 2018 · 4 comments

Comments

@shmish111
Copy link

I've managed to get the atom plugin working with bazel by creating the following script

bazel run //:my_lib_repl -- $@

However it is necessary to hard code the full path to the script in the idris executable path setting. I think we can get this working by copying from https://github.com/zaucy/atom-build-bazel/blob/master/src/BazelBuildProvider.js so that the plugin will look for bazel files and if it finds them it will look for the targets. We can then choose one of the repl targets (not sure how you decide this, an atom popup or something)?

Unfortunately I have little knowledge of atom and not much javascript, do you have any tips on how I would go about starting this or has anyone else looked at this at all?

@justjoheinz
Copy link
Contributor

Bazel?
I do not know what you are trying to solve, how it benefits the plugin etc. I am happy to help, but I would need some background information. I am currently lacking the time, to evaluate what you want to achieve with bazel, what it does in general etc. But in general terms: you go about it, by poking around. That's what I did :-)

@shmish111
Copy link
Author

So I've created a package set system using the build tool bazel called Smoke Hill. This means that Idris developers can depend on other Idris packages without installing them on their system or worrying about version conflicts etc. Builds are hermetic and reproducible and there is the possibility for lots and lots of caching meaning build times for bigger projects can drop dramatically.

For all this to be worth it, tooling needs to be good and at the moment, the atom plugin is one of the main USPs of Idris. If it worked well with bazel then the overall developer experience would already be very good since there is no need t worry about dependency hell with smoke hill.

The author of rules_haskell is also looking at the atom plugin I think and from my experiments it looks like it should be reasonably easy for someone who knows what they are doing to get things working.

@justjoheinz
Copy link
Contributor

I think the way to go would be to build your own idris-bazel plugin independent of the language-idris plugin. Didn't do this myself yet and with the seasons madness approaching I will not have the time to look into this anytime soon. If you keep posting questions here or set up a git repo I will be happy to answer what is thrown at me to my best knowledge.

@justjoheinz
Copy link
Contributor

Why is it not sufficient to simply install https://atom.io/packages/build-bazel ? What is gained by copying the code or some of it to the language-idris package?

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

No branches or pull requests

2 participants