Skip to content

Conversation

@michael-kerscher
Copy link
Collaborator

The new xtask function makes the helper code

  • more readable
  • more reliable due to better error checking
  • be in the same place as other helper functions
  • and more aligned to the skillset relevant for contributing in this repository.

The shell script grew and was not readable for everyone anymore without deeper knowledge.

mitigates #2941 in a more reliable way but does still not fully fix the root cause

@michael-kerscher michael-kerscher force-pushed the webtest-check-only-changed-slides-xtask branch 2 times, most recently from ab1ac86 to 05381dc Compare October 28, 2025 09:55
This makes the functionality more reliable and more aligned to the skillset relevant for contributing in this repository.

Also finally replaces the old way of running the script in the CI environment
@michael-kerscher michael-kerscher force-pushed the webtest-check-only-changed-slides-xtask branch from 05381dc to a8de18d Compare October 28, 2025 10:02
@michael-kerscher
Copy link
Collaborator Author

In the linked broken PR the previous shell script did something unexpected and worked with .js files and directories, which is wrong.
This is one of many reasons to abandon the shell script in favor of rust code. The new xtask code would check if files actually exist before listing them as file to check.

let mut cmd = Command::new("git");
cmd.arg("diff")
.arg("--name-only")
.arg(format!("{}...", base_ref))
Copy link
Collaborator Author

@michael-kerscher michael-kerscher Oct 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is one of the things I'm not 100% sure if this would create issues. This git diff should provide the list of filenames (--name-only) that was changed by this PR (over all commits). But I'm not sure about GITHUB_BASE_REF in various situations. I might need to use a more reliable way to do this

Copy link
Collaborator Author

@michael-kerscher michael-kerscher Oct 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GITHUB_BASE_REF might only be set in forked repositories (but not sure if this is the case), which would explain why I did not see issues with the previous shell script

@gribozavr gribozavr added the waiting for author Waiting on the issue author to reply label Oct 28, 2025
@michael-kerscher michael-kerscher force-pushed the webtest-check-only-changed-slides-xtask branch from 6ea837d to a26ffc9 Compare October 29, 2025 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting for author Waiting on the issue author to reply

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants