spack/.github/workflows
Harmen Stoppels 763b35a2e0
import-check: improve how problematic imports are displayed (#48825)
The import-check action now presents problematic import statements
introduced by the PR better.

The idea is roughly:

* Let (V₁, E₁) be the graph of modules as vertices and import statements
  as edges before the change
* Let (V₂, E₂) be the graph after the code change, which is typically a small
  perturbation of (V₁, E₁).
* X₁ = FAS(V₁, E₁) is the feedback arc set before (a minimal set of edges to
  delete to make it acyclic)
* X₂ = FAS(V₂, E₂ ∖ X₁) is the feedback arc set after deletion of the minimal
  set of edges that made the old graph acyclic.
* X₃ = FAS(V₂, E₂) is the feedback arc set after

Previously I displayed X₁ and X₃ and users had to diff themselves.

Now, I'm showing X₂, which is a small set, typically directly related to
code changes.

However, it can be that a small code change adding say 2 problematic imports
creates a completely different solution X₃ that only requires deletion of just 1
different import. In that case the user is informed that they can potentially do
less work.

So for PR #48784 the output is now:

> The overall number of problematic import statements increased by 1 from 31 to 32.
> This is likely a direct consequence of the following import statements:
> 
> ```
> spack/config imports: spack.spec, spack.util.path, spack.util.remote_file_cache
> ```
> 
> However, instead of removing 3 import statements, it is sufficient to remove only 1
> import statement from the following list:
> 
> ```
> spack/concretize imports: spack.bootstrap, spack.solver.asp
> spack/environment imports: spack.bootstrap, spack.environment
> spack/fetch_strategy imports: spack.version.git_ref_lookup
> spack/install_test imports: spack.build_environment, spack.package_base
> spack/modules imports: spack.modules
> spack/platforms imports: spack.config
> spack/relocate imports: spack.bootstrap
> spack/repo imports: spack.package_base, spack.patch, spack.tag
> spack/spec imports: spack.binary_distribution, spack.compiler, spack.compilers, spack.concretize, spack.environment, spack.hash_types, spack.provider_index, spack.repo, spack.spec_parser, spack.store, spack.traverse, spack.variant, spack.version.git_ref_lookup
> spack/subprocess_context imports: spack.environment
> spack/util/gpg imports: spack.bootstrap
> spack/util/package_hash imports: spack.package_base
> spack/util/path imports: spack.config, spack.environment
> spack/util/remote_file_cache imports: spack.util.web
> ```

from which the user can figure out that
`spack/util/remote_file_cache imports: spack.util.web` is the "bottleneck" now.
2025-02-02 20:56:38 -08:00
..
bin Remove years from license headers (#48352) 2025-01-02 15:40:28 +01:00
requirements Add type hints to spack.util.executable.Executable (#48468) 2025-01-09 14:16:24 -08:00
audit.yaml build(deps): bump actions/upload-artifact from 4.4.3 to 4.5.0 (#48180) 2024-12-18 13:01:30 -06:00
bootstrap.yml build caches: collect files to relocate while tarballing w/o file (#48212) 2024-12-24 10:53:13 -07:00
build-containers.yml Remove pipelines and images based on ppc64le (#48767) 2025-01-29 16:36:25 +01:00
ci.yaml ci: ci/all must always run, and fail if any job has status "fail" or "canceled" (#47517) 2024-11-09 06:04:51 -08:00
coverage.yml build(deps): bump codecov/codecov-action from 5.0.3 to 5.1.2 (#48200) 2025-01-09 12:33:45 +01:00
nightly-win-builds.yml build(deps): bump actions/checkout from 4.2.1 to 4.2.2 (#47185) 2024-10-25 09:48:50 -07:00
unit_tests.yaml build caches: collect files to relocate while tarballing w/o file (#48212) 2024-12-24 10:53:13 -07:00
valid-style.yml import-check: improve how problematic imports are displayed (#48825) 2025-02-02 20:56:38 -08:00