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

No impacted targets when a file in an external repository changes #197

Open
mvgijssel opened this issue Dec 19, 2023 · 4 comments
Open

No impacted targets when a file in an external repository changes #197

mvgijssel opened this issue Dec 19, 2023 · 4 comments

Comments

@mvgijssel
Copy link

mvgijssel commented Dec 19, 2023

In vgijssel/setup#617 I'm surprised that a change to a file rules/rules_release/tools/lib/repositories/BazelDiffRepository.mjs which is part of a filegroup @rules_release//:all_files is not reporting as changed. @rules_release is an external repository which is located within the same git repository. I've configured bazel-diff to use --fineGrainedHashExternalRepos=rules_release,. Thoughts on what could be the issue? I'm using the latest version:

    http_jar(
        name = "bazel_diff",
        sha256 = "7943790f690ad5115493da8495372c89f7895b09334cb4fee5174a8f213654dd",
        urls = [
            "https://github.com/Tinder/bazel-diff/releases/download/5.0.0/bazel-diff_deploy.jar",
        ],
    )
~/Development/setup mg/451/fix-provisioner-deploy
(devbox) nix-shell-env ❯ bazel query 'deps(@rules_release//:all_files)'
@rules_release//:.bazelignore
@rules_release//:.bazelrc
@rules_release//:.bazelversion
@rules_release//:BUILD.bazel
@rules_release//:CHANGELOG.md
@rules_release//:MODULE.bazel
@rules_release//:WORKSPACE
@rules_release//:all_files
@rules_release//:package.json
@rules_release//:pnpm-lock.yaml
@rules_release//:version.txt
@rules_release//release:BUILD.bazel
@rules_release//release:all_files
@rules_release//release:changesets_cli.mjs
@rules_release//release:cli.mjs
@rules_release//release:defs.bzl
@rules_release//release:extensions.bzl
@rules_release//release:lib/actions/GenerateAction.mjs
@rules_release//release:lib/actions/PublishAction.mjs
@rules_release//release:lib/actions/VersionAction.mjs
@rules_release//release:lib/repositories/ChangelogRepository.mjs
@rules_release//release:lib/repositories/ChangesetRepository.mjs
@rules_release//release:lib/repositories/ConfigRepository.mjs
@rules_release//release:lib/repositories/PackageRepository.mjs
@rules_release//release:lib/repositories/PublishRepository.mjs
@rules_release//release:lib/repositories/ReleaseRepository.mjs
@rules_release//release:lib/repositories/VersionRepository.mjs
@rules_release//release:lib/utils.mjs
@rules_release//release:repositories.bzl
@rules_release//release:repository_primary_deps.bzl
@rules_release//release:repository_secondary_deps.bzl
@rules_release//release/private:BUILD.bazel
@rules_release//release/private:all_files
@rules_release//release/private:release.bzl
@rules_release//release/private:release_info.bzl
@rules_release//release/private:release_manager.bzl
@rules_release//release/private:utils.bzl
@rules_release//release/private:version_changelog.mjs
@rules_release//tools:BUILD.bazel
@rules_release//tools:all_files
@rules_release//tools:bazel_diff_change_cli.mjs
@rules_release//tools:defs.bzl
@rules_release//tools:lib/actions/BazelDiffChangeAction.mjs
@rules_release//tools:lib/repositories/BazelDiffRepository.mjs
@rules_release//tools/private:BUILD.bazel
@rules_release//tools/private:all_files
@rules_release//tools/private:bazel_diff_release.bzl
@rules_release//tools/private:publish_github_release.bzl
@rules_release//tools/private:publish_oci_image.bzl
Loading: 0 packages loaded
@mvgijssel
Copy link
Author

mvgijssel commented Dec 19, 2023

If I list out all files explicitly

find $PWD/rules/rules_release -type f > /tmp/files

And specifying

--seed-filepaths=/tmp/files --fineGrainedHashExternalRepos=rules_release

It does list as changed, but not sure what the implications are exactly 🤔. Checking the changed targets file shows now that basically all files have changed 😅

@faximan
Copy link

faximan commented Feb 9, 2024

Could this be the same as #134?

@mvgijssel
Copy link
Author

Yeah I guess so! But is it also expected that if you provide the —seed-filepaths flag it will always flag as changed?

@faximan
Copy link

faximan commented Feb 9, 2024

I don't have an answer, but as a meta comment think the --seed-filepaths flag should be better documented. I have seen it suggested in a few places but I keep re-reading the docs

    A text file containing a newline separated list of
                            filepaths, each of these filepaths will be read and
                            used as a seed for all targets.

and I just don't understand what that means.

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

No branches or pull requests

2 participants