changed-files: [BUG] Issue with `files_yaml`?

Is there an existing issue for this?

  • I have searched the existing issues

Does this issue exist in the latest version?

  • I’m using the latest release

Describe the bug?

It seems that changes in one subset are propagating to other subsets, e.g.:

  base:
    - Source/**
    - Lib/std/**
    - Lib/typemaps/**
    - Lib/xml/**
    - Lib/*
    - Examples/Makefile.in
    - Examples/test-suite/*
    - Examples/test-suite/errors/*
  python:
    - Lib/python/**
    - Examples/python/**
    - Examples/test-suite/python/**

It seems to propagate into _other_changed_files

  .github/outputs/base_all_modified_files.json:[]
  .github/outputs/base_any_changed.json:true
  .github/outputs/base_any_modified.json:true
  .github/outputs/base_other_changed_files.json:[".github/workflows/step_change-detection.yml",".github/workflows/step_get-variants.yml",".github/workflows/step_lang-test.yml",".github/workflows/step_nuget.yml",".github/workflows/step_toolchain-test.yml","Lib/python/file.i"]

Note that base_other_changed_files.json contains Lib/python/file.i, which is not supposed to be there from the glob expression of base

To Reproduce

https://github.com/LecrisUT/swig/actions/runs/6074609826/job/16479045195?pr=1

What OS are you seeing the problem on?

ubuntu-latest or ubuntu-22.04

Expected behavior?

.github/outputs/base_any_changed.json

false

Relevant log output

Truncated log above

Has all relevant logs been included?

  • I’ve included all relevant logs

Anything else?

No response

Code of Conduct

  • I agree to follow this project’s Code of Conduct

About this issue

  • Original URL
  • State: closed
  • Created 10 months ago
  • Comments: 18 (11 by maintainers)

Most upvoted comments

Tested the fix and it now works as expected. Thank you for the work on this

But that is exactly what is confusing me. I indeed do NOT want Lib/python/file.i to be matched in base. It is meant to be matched only in python, that is why I am using Lib/* instead of Lib/**.

The issue is that Lib/python/file.i is included in base_other_modified_files (it should not be there because it is not part of the glob pattern), but more importantly base_any_modified should be false (but it is set to true probably because of base_other_modified_files; any_changed, any_deleted and any_modified are all set to true). Otherwise I do not see which variable can I reliably check for the glob that is given in base.

As a temporary workaround, checking base_all_modified_files should pick up all expected changes instead of base_any_changed?

I see this is a bug in that case since they should all be false