Skip to content
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

bzlmod issue #699

Closed
malkia opened this issue Feb 26, 2024 · 1 comment · Fixed by #700
Closed

bzlmod issue #699

malkia opened this issue Feb 26, 2024 · 1 comment · Fixed by #700

Comments

@malkia
Copy link
Contributor

malkia commented Feb 26, 2024

I'm trying to use prometheus-cpp through bzlmod, e.g. in my MODULE.bazel file I'll have:

bazel_dep(name = "prometheus-cpp", version = "1.2.3", repo_name = "com_github_jupp0r_prometheus_cpp")
archive_override(
    integrity = "sha256-VeIKdR/CWf7WpDjoz1o8vOvjqpP4OqTqjYgKdQgQyu4=",
    module_name = "prometheus-cpp",
    strip_prefix = "prometheus-cpp-with-submodules",
    urls = [
        "https://github.com/jupp0r/prometheus-cpp/releases/download/v1.2.3/prometheus-cpp-with-submodules.tar.gz",
    ],
)

but it'll fail to find the @platforms module, because it was marked as "dev_dependency = True" in here https://github.com/jupp0r/prometheus-cpp/blob/master/MODULE.bazel#L17 (I guess similar would be for "rules_cc")

My understaing of dev_dependency = True is that it does not propagate to whoever uses the module - e.g. it's for say testing, benchmarks (as it's done), but civetweb.BUILD needs it (others too), hence it'll fail.

In the mean time I'll create a soft-fork branch of prometheus-cpp (Thanks for the awesome library), and try from there.

Here are some of the errors:

ERROR: Q:/b/u/c56xnmzt/external/prometheus-cpp~override~data_deps_ext~civetweb/BUILD.bazel:10:15: no such package '@@[unknown repo 'platforms' requested from @@prometheus-cpp~override~data_deps_ext~civetweb]//os': The repository '@@[unknown repo 'platforms' requested from @@prometheus-cpp~override~data_deps_ext~civetweb]' could not be resolved: No repository visible as '@platforms' from repository '@@prometheus-cpp~override~data_deps_ext~civetweb' and referenced by '@@prometheus-cpp~override~data_deps_ext~civetweb//:windows'

and (just saw as I was typing, similar for rules_cc)

ERROR: Q:/b/u/c56xnmzt/external/prometheus-cpp~override~data_deps_ext~civetweb/BUILD.bazel:50:11: error loading package '@@prometheus-cpp~override~data_deps_ext~boringssl//': Unable to find package for @@[unknown repo 'rules_cc' requested from @@prometheus-cpp~override~data_deps_ext~boringssl]//cc:defs.bzl: The repository '@@[unknown repo 'rules_cc' requested from @@prometheus-cpp~override~data_deps_ext~boringssl]' could not be resolved: No repository visible as '@rules_cc' from repository '@@prometheus-cpp~override~data_deps_ext~boringssl'. and referenced by '@@prometheus-cpp~override~data_deps_ext~civetweb//:libcivetweb'
@gjasny
Copy link
Collaborator

gjasny commented Mar 2, 2024

I released v1.2.4 with your fix: https://github.com/jupp0r/prometheus-cpp/releases/tag/v1.2.4

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 a pull request may close this issue.

2 participants