Skip to content

Tracking issue: Angular BuildTools Convergence (ABC) #19058

Closed

Description

@alexeagle

We are open-sourcing the toolchain we use internally at Google to build Angular apps at scale.

One-pager: http://g.co/ng/abc

This issue will be used to give updates on progress.

FAQ: how does this relate to Angular CLI? We will evaluate this toolchain with some early adopters first, if it goes well, we will evaluate whether to use it inside the CLI. So long as you haven't ejected from the CLI, such a change should be transparent to users.

Activity

  1. self-assigned this
    on Sep 5, 2017
  2. zh99998 commented on Sep 6, 2017

    @zh99998

    sounds like a big news.
    will angular-cli moves to ABC and drop recommend of current webpack-based build system ?

  3. abdel-ships-it commented on Sep 6, 2017

    @abdel-ships-it

    Looks promising !

    Is this going to kill the angular CLI? And will it eventually be a drop in replacement for codebases built with the angular CLI?

  4. mlc-mlapis commented on Sep 6, 2017

    @mlc-mlapis
    Contributor

    @realappie Angular CLI is a top layer so it should not be affected a lot but some changes probably could be.

  5. alexeagle commented on Sep 6, 2017

    @alexeagle
    ContributorAuthor

    Updated the description above. It's possible this could be the build system in the CLI one day, but too early to be sure.

  6. added
    area: bazelIssues related to the published `@angular/bazel` build rules
    on Oct 13, 2017
  7. alexeagle commented on Nov 21, 2017

    @alexeagle
    ContributorAuthor

    Update: we are starting to accept enterprises in an Early Access Program, to try this out with support from our team.
    If you are willing to tolerate risk, missing documentation, and commit to giving feedback, then we'd like to have you use this soon. Fill out https://goo.gl/forms/Tv8lMdH0N3D4yo8Q2 and I'll get in touch once we are ready to support your use cases.

  8. crutchcorn commented on Nov 21, 2017

    @crutchcorn
    Contributor

    Is there any way for individuals to sign up for this program rather than corporations?

  9. alexeagle commented on Nov 22, 2017

    @alexeagle
    ContributorAuthor
  10. GoNode5 commented on Nov 22, 2017

    @GoNode5

    @alexeagle could you define in time/seconds what you think is a slow build. The fact that the Angular platform degraded JIT, to a old fashioned build/compile/link time experience, even with small projects, I don't know what to expect. The reason I chose Javascript is because of JIT, wich I don't enjoy anymore in relation to Angular. AngularJS jit was F5 refresh build. Now ng build --prod is something to execute is low as possible, even with 'small ish?' projects.

  11. schmitch commented on Nov 22, 2017

    @schmitch

    I doubt that AnulgarJS jit was F5 refresh + build.
    Either your browser loaded for some seconds or it took at least seconds to actually concat all the files.
    AOT is the same, than any concat, just that it is more clever which will reduce the browser loading time.

  12. mlc-mlapis commented on Nov 22, 2017

    @mlc-mlapis
    Contributor

    @GoNode5 ... actually you can have dev time which is < 1 second = you just don't wait at all.

    Another story is the whole building process to produce a completely new build for production or testing server (which is just internal version = the last step before production).

  13. alexeagle commented on Nov 23, 2017

    @alexeagle
    ContributorAuthor

    Our goal is <2s dev roundtrip (50%ile) for a large project, O(thousands) of source files.

  14. GoNode5 commented on Nov 23, 2017

    @GoNode5

    @schmitch You can doubt what you want, just look at a hello world ng serve size Angular project...

    Compared that to my AngularJS project F5 (cache disabled) . I could add 600KB Angular Code but that wouldn't change much. The show load in image is a full project with about 30 screens, multi language. The thirdparty libs take's most of the load.

    image

    With runtime / ng build -prod, I'am very happy with the 'end' result. Fast, small en stable. But my developers experience is ruined. I had to buy a faster computer, create strategy's. In a larger project it's not only the ng serve rebuild time, but the runtime compile feels also slow.

    For me the whole JIT experience is gone while developing.

  15. 40 remaining items

  16. marcus-sa commented on Aug 14, 2019

    @marcus-sa

    Support for LESS would be great as well!

  17. mgechev commented on Aug 20, 2019

    @mgechev
    Member
  18. mgechev commented on Oct 24, 2019

    @mgechev
    Member

    We have two major Bazel updates for you today!

    🎉 Bazel 1.0 is out!

    Few key features of the 1.0 release are:

    • Semantic Versioning
    • Long-Term Support
    • Well-rounded features for Angular, Android, Java, and C++

    You can read more in the official announcement on the Google Open Source blog. Additionally, you can find a gentle introduction to Bazel and its experimental integration with the CLI in this community post by Ignacio Le Fluk "Angular + Bazel: Getting ready!".

    📣 Enhanced JavaScript support

    Talking about well-rounded features for Angular, Bazel can now run pretty much any module with an executable from npm! You can directly load the binary in your BUILD file and execute an automatically generated rule. For example, you can start an http server with the following short snippet:

    load("@npm//http-server:index.bzl", "http_server")
    
    http_server(
        name = "server",
        data = [
            "index.html",
            "app.es5.js",
        ],
        templated_args = ["."],
    )

    Read more about the first-class JavaScript support in this post by @alexeagle.

  19. glebmachine commented on Jan 13, 2020

    @glebmachine

    @alexeagle you added bazel/stylus rule, but, it still unsupported by @angular/bazel builders
    Could you please add stylus[, less] support to angular/cli

    Looking forward to migrate to bazel toolchain : )

  20. afifalfiano commented on Apr 6, 2020

    @afifalfiano

    Hallo, i'm beginner using bazel on windows, do you know what this problem? and any solution?

    how

  21. petebacondarwin commented on Apr 6, 2020

    @petebacondarwin
    Contributor

    @afifalfiano - I propose that your core Angular libraries have not been compiled by ngcc to be consumable by the Angular ivy compiler. This is managed for you with the Angular CLI. I don't know much about how it is done if using Bazel directly. I suggest that you try running ngcc in your project root to compile all the node_modules packages.

  22. afifalfiano commented on Apr 7, 2020

    @afifalfiano

    @afifalfiano - I propose that your core Angular libraries have not been compiled by ngcc to be consumable by the Angular ivy compiler. This is managed for you with the Angular CLI. I don't know much about how it is done if using Bazel directly. I suggest that you try running ngcc in your project root to compile all the node_modules packages.

    oke, absolutely i got soluction, when first i compile using ngcc and then i build this project using bazel run target, everything running well, but i have another problem, when i running ng serve, my project can't running cause ibazel cant find the file existing bazelisk

  23. alexeagle commented on Jun 15, 2020

    @alexeagle
    ContributorAuthor

    Update here: I published a blog post about Bazel support for Angular along with other frameworks, using an approach that relies less on Angular supporting any Bazel-specific bits.
    https://dev.to/bazel/angular-bazel-leaving-angular-labs-51ja

  24. afifalfiano commented on Jun 15, 2020

    @afifalfiano

    @alexeagle Hello Alex, how do I configure an angular environment with bazel? Before using bazel, I use file Replacement in angular.json? any idea?

  25. hiepxanh commented on Jul 26, 2020

    @hiepxanh
    Contributor

    I just successful run the Bazel on my Windows computer, it really amazing, just wonder any kind of "getting start with Bazel and Angular". Because I already read the BUILD.bazel but not really family with it

  26. literalpie commented on Jul 26, 2020

    @literalpie
    Contributor

    @hiepxanh I believe the best resource available is the example code here. If you're looking for a tutorial or guide to get started, I don't think there's a particular one that stands out as the best.

    I would recommend the sample code because it is maintained along with the nodejs rules, so it should always be up to date. It also has some comments that do a little explaining of why certain things are included and what they do.

  27. alexeagle commented on Jul 26, 2020

    @alexeagle
    ContributorAuthor

    🥇 Here's the final update 🥇

    I started this project three years ago with two ambitious requirements:

    1. Provide a scalable toolchain for big companies like Google with massive apps beyond the limits of existing OSS tooling
    2. Angular team maintains only one toolchain

    I think we have reached the first goal. Angular + Bazel has left Angular Labs and has some production usage. We have been maturing this and just reached 2.0 of rules_nodejs, where this support is maintained, demonstrated, and documented.

    However the second requirement is much harder. Angular must maintain the CLI and keep all users updated to the latest. Switching this to Bazel required making it adoptable by the most novice users on small projects. This is the "Convergence" in the project title. It's very hard and was only ever staffed by one engineer (@gregmagolan who's awesome), plus me in part-time.

    We didn't achieve Convergence, so Angular team will continue to maintain only the CLI (and the underlying build system called "Architect" aka CLI Builders). You can choose to layer Bazel on top of that underlying build system, continuing to use Architect for compatibility as documented here; that means you can still use Angular-team-supported tooling under Bazel (though with limited benefits). Big thanks to @alan-agius4 for volunteering to support this option.

    What should you do?

    If your project fits in Angular CLI, you should use it. Convergence isn't happening. Novice developers will never get the easy turnkey documentation and tools to switch. Bazel will never be the default, so we can close this issue.

    Bazel has an on-ramp that requires understanding your build process in detail, and learning some new things like Bazel's configuration language. It's only suitable for projects where someone is willing to take the role of a build system engineer. I believe that extra-large-sized projects already have someone staffed to deal with deficiencies in the OSS toolchains, so in practice if you really need Bazel, you're probably a good fit to adopt it.

    You can continue to follow our development in rules_nodejs, or join the #angular channel in http://slack.bazel.build

    Thanks Angular community you are all awesome. Much ❤️

  28. angular-automatic-lock-bot commented on Aug 26, 2020

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  29. locked and limited conversation to collaborators on Aug 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area: bazelIssues related to the published `@angular/bazel` build rulesfeatureLabel used to distinguish feature request from other issues

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions