-
Notifications
You must be signed in to change notification settings - Fork 36
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
Consider turning bb-browser into a Single Page Application based on Elm? #4
Comments
We're making some progress here. rules_elm now basically works. I can build Elm code through Bazel properly now, meaning that we can mix a Go backend implementation with an Elm frontend. A couple of days ago I created the |
How did you get this working? I am coming from the point of people who like to free the Elm package system up to a little. How did you achieve that? |
@ShalokShalom: you can take a look at rules_elm, using |
Even though we should consider switching to an SPA in the future, I no longer think that Elm is the right choice for this. Marking this as closed. |
Can you elaborate? What made you change your mind? |
Sure! I think that Elm both as a language and as a design pattern is pretty awesome. It is a great fit for bb-browser. What I think is pretty bad about Elm is that the project seems to move at a glacial pace. For example, consider this PR for What's really annoying is that the Elm compiler also restricts the use of certain language features to packages with author With rules_elm I somewhat managed to work around this by manually crafting some binary metadata files that the compiler normally stores between invocations. The structure of these files I was only capable of discovering by reading Elm compiler source code, but I don't think that's a sustainable solution. There's a fair chance the next version of Elm will use a different file format. In my opinion, Elm should be seen as being "Open Source Software" only in the literal sense. It is not free software, nor is it a community project. Sure, Buildbarn is also not a true community project. Sometimes things get proposed by members from the community that receive pushback from my side. Unlike Elm, I'm not trying to dictate how people use Buildbarn. |
Frankly (this is coming from someone who's been using elm since 2013), I wouldn't use elm. There's been 0 movement on a lot of things, including no private repos, as you've mentioned. Elm has left a really nasty taste in a lot of people's mouths after their PR fiasco. React is ridiculously simple now with typescript and hooks being mainline, and it would increase surface area on people who could contribute. |
Thank you for your responses @EdSchouten and @aaahrens. |
Buildbarn Browser currently uses Go templates to generate static HTML pages. This worked out all right for things like build actions, but for build events this is less than ideal. For build events, we eventually want contents to update dynamically. There is also some quadratic expansion we should only do on the client side on demand (e.g., output files for an action).
In theory, Elm would be a pretty good language for writing such a web application. It allows us to get the dynamic updates of build events implemented in a robust way. I already took a stab at implementing a rules_elm for Bazel. Unfortunately, I haven't been very successful at that, because the Elm compiler is strongly integrated with Elm's package manager, meaning it can't easily do fully isolated and reproducible builds.
The text was updated successfully, but these errors were encountered: