Coder Social home page Coder Social logo

Comments (5)

fmeum avatar fmeum commented on August 16, 2024

Maybe not as convenient as a flag, but you could use something like buildozer 'set version 1.2.3' //MODULE.bazel:%module to update the MODULE.bazel file in CI.

from bazel.

SanjayVas avatar SanjayVas commented on August 16, 2024

@fmeum Thanks, that's certainly helpful for the short term. The main reason it's not a true workaround is that CI should usually have --lockfile_mode=error set. Changing the contents of MODULE.bazel also means handling lockfile checks.

from bazel.

Wyverald avatar Wyverald commented on August 16, 2024

@fmeum Thanks, that's certainly helpful for the short term. The main reason it's not a true workaround is that CI should usually have --lockfile_mode=error set. Changing the contents of MODULE.bazel also means handling lockfile checks.

With Bazel 7.2.0+, changing the root module version (which doesn't affect module version resolution at all) will no longer interfere with --lockfile_mode=error.

from bazel.

SanjayVas avatar SanjayVas commented on August 16, 2024

With Bazel 7.2.0+, changing the root module version (which doesn't affect module version resolution at all) will no longer interfere with --lockfile_mode=error.

I just tested this after upgrading to Bazel 7.2.1 and still got an error with --lockfile_mode=error. Running bazel mod deps --lockfile_mode=update updates the usagesDigest field for two module extensions: @@rules_jvm_external~//:extensions.bzl%maven and @@rules_oci~//oci:extensions.bzl%oci.

from bazel.

fmeum avatar fmeum commented on August 16, 2024

You are right, this makes sense: module extensions see the version as declared by any module with a use_extension for them. Since extensions can perform arbitrary logic based on it, there is no way to change the version without invalidating the lockfile to some extent. Having a flag for it unfortunately wouldn't change this.

from bazel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.