hedronvision / bazel-compile-commands-extractor

Goal: Enable awesome tooling for Bazel users of the C language family.
Other
697 stars 115 forks source link

name 'module_extension' is not defined when used in Tensorflow-1.15.5 version #176

Open linlang1837 opened 8 months ago

linlang1837 commented 8 months ago

Bazel version: 0.26.1

ERROR: /root/.cache/bazel/_bazel_root/80709a9f7d7f227d2bcf9e421ac096e0/external/hedron_compile_commands/workspace_setup.bzl:28:37: name 'module_extension' is not defined ERROR: error loading package '': Extension 'workspace_setup.bzl' has errors ERROR: error loading package '': Extension 'workspace_setup.bzl' has errors

cpsauer commented 8 months ago

Hi @linlang1837! 👋🏻

That's a super old version of bazel! (And that's the cause of the issue.) I don't think it makes sense for us to support something that far back. Any chance you can upgrade? If not, the versions before we added bzlmod support should work for you, but you won't get the latest bug fixes.

Chris

linlang1837 commented 8 months ago

Thanks, I will try the versions before adding bzlmod support. By the way, how can I can find the version before adding bzlmod support.

cpsauer commented 8 months ago

Just do a quick search of the commits! I think ac6411f8f347e5525038cb7858db4969db9e74f2 is a good one to try, being just before. Note that you'll lose nvcc support, though, among a bunch of other things...there are also a lot of bugs in those ancient bazel versions and missing features, so I'm realizing that I'm not exactly sure what will and won't work.

Oh, actually, well, this isn't really future-proof and I wouldn't necessarily recommend it generally, but you could instead just skip calling all those workspace_setup functions. It'll break in some future commit, but that way you'd get the latest fixes for now but skip those errors.

Really, it makes sense to update from that ancient, pre-release version of Bazel! Bazel 5 is the oldest one that they're even considering to be in maintenance mode--and the latest those lines work with--I'd strongly recommend bazelisk and the rolling releases.

linlang1837 commented 8 months ago

thanks, I will try.