-
Notifications
You must be signed in to change notification settings - Fork 79
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
Initial roadmap. #19
Initial roadmap. #19
Conversation
Did not touch sparkle yet, hopefully will get to that by end of today and can fill that in. I'm not sure I agree on those priorities.
I don't actually think this is critical, in practice how often do you pass compiler flags on CLI that change constantly? It's important but don't know about blocker.
I would put this as P2 or not even in 1.0. It's an optimisation that I'm not even convinced we'll want yet and even if we're convinced we do, it should be a separate project that acts as a drop-in GHC.
See above
Do we want to force
I think we should have either the nixpkgs way or official bindist way with leaning towards latter.
For 1.0? I don't think we should mess with that until native build story is completely solid…
|
Why do we have to choose? The latter isn't a possibility to begin with on all platforms (e.g. NixOS). I'll reduce priority on command-line args. |
After discussion off GitHub, I agree with most things here now. I would like to change some wording on incremental build part (we want an incremental build, not a specific solution right now). I got delayed and will only be able to add my parts tomorrow. |
I reckon we should include this in the roadmap, even though we don't have all the details decided. We know we want to do it, after all. |
Yes, better to talk about the objective only: incremental builds. |
I'm following along and very excited about this project. I work on the scala rules for bazel (which we use in production at Stripe). I'd be interested in using these rules. For incremental builds, I hope these rules just lean on bazel and don't keep any build state in workers. Bazel, as you probably know, allows you to have worker processes, but the intent is that build is still a pure function of inputs to outputs. I'm a bit nervous about safety of using bazel caching (which is a huge feature) if too much state is kept in the worker. I hope we can just use small targets and let bazel's default approach for incrementalism work. Thanks for your work on this! |
@jml I myself don't know yet, but maybe you guys do? e.g. Java projects don't state source level dependencies in the Bazel graph, because the Java compiler figures them out. The same is true of GHC ( Or did you mean generate |
@johnynek really great to have you stop by! Rule granularity is perhaps the hardest issue we've had to grapple with so far - we've been going back and forth on this since we started about what the best choice would be for Haskell given the very slow compile times. So any experience report here would be great. in rules_scala and at Stripe, what is the unit of compilation typically exposed to Bazel? Is the a single source file? Or a group of source files? Or a whole "package" (i.e. library)? If you are specifying dependencies between source files in
Just curious - you mean, to build Haskell code as well and not just the Scala/Java code you guys have at Stripe? |
We have usually 1-10 build rules per directory. Some put everything in the directory in one rule, some break it up somewhat. We have a macro that allows the user to manually declare the source dependencies and then presents a single target for external dependencies: scala_module(
name = "foo",
src_deps = {
"Foo.scala": [],
"Bar.scala": ["Foo.scala", "Baz.scala"],
"Baz.scala": [],
},
deps = [ ...
) That makes a single target per file internally, but all those are private visibility, then the name exports all the internal targets. This has worked pretty well so far: not too verbose, but also great incrementalism and easy way to depend on the whole thing externally. I talked to the bazel folks at bazelconf about bazel having a limited form of dynamic targets that would allow a tool to tell bazel these internal private targets. There was some interest to address slower compilers (like scala, C++, haskell, ...) As for using these rules, @non and I wrote an internal tool in haskell. It would be nice to be able to build it with bazel like the rest of our builds rather than stack. |
Link cbits statically on Windows
Fix bogus #19 and check for '.' in include dirs
Modeled like the Bazel roadmap.
I omitted for now items that are still speculative and therefore
haven't been scheduled yet. Two in particular come to mind:
BUILD
files. Makes sense. But need todiscuss: whether a Gazelle-like approach makes sense for Haskell,
whether we want something more fine grained or more coarse grained.
Stackage would call "snapshots" to other tools (namely Nix). It's
unclear whether Bazel build rules want to be getting into that
business and for what gain.