Skip to content

Conversation

@z8v
Copy link
Contributor

@z8v z8v commented Dec 1, 2025

  • Added bzlmod support on the examples
  • Replaced rules_docker with rules_oci

@z8v z8v force-pushed the update-other-examples-bzlmod branch 6 times, most recently from a8ce95a to 164b2a0 Compare December 1, 2025 20:34
@z8v z8v force-pushed the update-other-examples-bzlmod branch from 164b2a0 to eb822fa Compare December 1, 2025 20:48
@z8v z8v marked this pull request as ready for review December 1, 2025 21:08
@z8v z8v requested a review from a team as a code owner December 1, 2025 21:08
Copy link
Collaborator

@layus layus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Such an impressive rework. Not much code, but so many subtle edits. Thanks !
I am a bit concerned about the use of deprecated constructs, and the reason why we diverge from common conventions. Not a big worry, but an explanation in some readme would help, or next to the changes.

A bigger issue is that we impose all our users or rules_nixpkgs_cc to configure their own module extension. Is that by design ? Or a shortcut taken in these examples ?

# Toolchains
#

cc_configure = use_extension("//:extension.bzl", "cc_configure")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we absolutely have to define our own module extension to use cc toolchains ?
I feel like that extensions pertains to rules_nixpkgs_cc itself, with tags for the config. But maybe it is not implemented yet ?

import %workspace%/../../.bazelrc.remote-cache

build --host_platform=@rules_nixpkgs_core//platforms:host
build --crosstool_top=@nixpkgs_config_cc//:toolchain
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having crosstool_top used seems weird. Should it not be selected by default by the toolchain selection engine ?

Or is this intended as a demo on how to force a specific toolchain ?
I feel like crosstool_top is on the verge of deprecation.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this intended ? Do we want this version to diverge from ../../.bazeliskrc ?

@@ -1,2 +1,3 @@
bazel-*
result
MODULE.bazel.lock
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, why is this repo different ? Is this related to python 7 and any run altering that lockfile ?

@z8v z8v marked this pull request as draft December 2, 2025 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants