Skip to content

upgrade path for node and yarn and reproducible builds #67

Open
@erickj

Description

@erickj

Hi all

As I spend more time digging into JS/bazel rule sets, rules_node seems to be garnering more and more of my attention. Given that bazel is still a nascent system and adopting a set of non-core build rules is a significant commitment I'd like to understand the longer term plans for rules_node.

Specifically the following:

  1. nodejs and yarn currently sit at 7.x.x and 1.0.1 respectively. With the current LTS node release at 8.10.x and yarn releasing a new version every ~1month or so, what are the plans for regular updates to the default versions of node and yarn? (FTR, the node 7.x branch is EOL in June.

As a quick check I verified that these versions pass against the current tests:
erickj@2ca8d6a

  1. reproducible builds: certainly switching to yarn was a good step towards slimmer/reproducible builds, however given that the yarn.lock file is part of the @yarn_modules external repo, rather than checked into version and --frozen-lockfile flags aren't used, isn't the point of the lock file lost? even if the yarn_modules repository rule is declared with only explicit versions, if the transitive deps of the NPM packages use range package versioning then these will generate inconsistent builds across bazel clean or even between CI runs, no? shouldn't the lock file live in the "including" repository as part of version control? and be passed into the yarn_modules rule for verification? similar to how checksums are used on other bazel external repository rules.

Something like this (which I partly borrowed from bazelbuild/rules_nodejs):
erickj@3e36ca9

Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions