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

Use of bazelisp: google vs. non-google project #19

Open
jeosol opened this issue May 5, 2021 · 2 comments
Open

Use of bazelisp: google vs. non-google project #19

jeosol opened this issue May 5, 2021 · 2 comments

Comments

@jeosol
Copy link

jeosol commented May 5, 2021

Hi Devs,

First of all, I have never used bazelisp.

Second, I am trying to use this tool to build a large CL/SBCL and would want to speed things up. I am reading through the README to understand the tool. I have a few questions:

  1. Can bazelisp be used for outside projects and not just google projects
  2. Coming from using quicklisp/ASDF, are there differences with bazelisp. Is there a simple test/tutorial that shows how one may structure things to use bazelisp given that most CL developers seem to use the quicklisp/ASDF.
  3. My interest is in speeding up build times so I am looking into bazelisp for testing, in addition to trying to updated Fare's POIU (in ASDF) to work with recent SBCL versions, i.e., get it to do parallel builds.

Thanks

@svetlyak40wt
Copy link

I've tried to run bazel build //... inside a cloned repository and have got this error:

ERROR: /Users/art/projects/lisp/bazelisp/rule-tests/BUILD:221:24: no such target '@bazel_skylib//:additional_dynamic_load_outputs': target 'additional_dynamic_load_outputs' not declared in package '' defined by /private/var/tmp/_bazel_art/184bb0c53499abd3d40475947a2fb54d/external/bazel_skylib/BUILD
ERROR: Analysis of target '//rule-tests:test-lisp-deps-test' failed; build aborted:
INFO: Elapsed time: 0.105s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded, 0 targets configured)

@jeosol was you able to solve this problem?

@jeosol
Copy link
Author

jeosol commented Feb 19, 2022

@svetlyak40wt

Hi Alex,

It is interesting you also tried bazelisp. To answer your question quickly, I didn't get it to work - yet.

I will provide some background below and a summary of the response from Google guys when I contacted them.

The main problem I have was a lack of documentation especially for using outside projects. So I had to search on the web and finally emailing some guys in the qitab team. I was informed that their priority is on Google internal projects which is fair. I wanted to understand how to even set things up. Also the Google version that worked for them with the github code was a bit older (I guess for stability).

There is a challenge on where to even start for someone trying to use bazelisp. At the time, I didn't even know you also had to have bazel proper (the main engine) also installed. I did try to create a bazelisp fork and use for more recent SBCL version (only CL implementation I use for my project). There were many changes I had to do at the time but stopped to use plain ql and ASDF.

Another challenge I saw (after searching on the web and discussing with Fare) is that you need big machines to get things to work very well and see benefits. I was able to use bazel proper to test C++ files and they have tutorials for that on the main website but I could not get bazelisp to work. I do plan to look at it again sometime later.

Another challenge I remember is that you need to handcraft the rules files as the Google guys told me (at least at the time) they are interested in a tool that can automatically build those rule files from asdf system definitions. My code base is large, so I can't build those rules by hand and only an automatic tool will enable me try bazelisp out. Another alternative is to write rules for a smaller subsystem just to see how bazelisp works.

Another option is Fare's PIOU but it also needs some work to get it to work with recent versions (at least when I tried it). There are some criticisms of the tool, one of which is its use of fork to do the parallel builds. I also haven't gotten this to work but I did hack a local PIOU version for some time, again to come back to it later.

Apologies for the long winded response, I just wanted to provide some background and context.

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