Skip to content

Fail when packages cannot be found#49

Open
kurtmckee wants to merge 1 commit intocygwin:masterfrom
kurtmckee:error-on-missing-packages-issue-20
Open

Fail when packages cannot be found#49
kurtmckee wants to merge 1 commit intocygwin:masterfrom
kurtmckee:error-on-missing-packages-issue-20

Conversation

@kurtmckee
Copy link
Copy Markdown
Contributor

@kurtmckee kurtmckee commented Jan 13, 2026

This introduces a new error-on-missing-packages input, which defaults to true. This is a breaking change.

Currently, only the phrase "Package 'xyz' not found." is searched for in the output of the install. The documentation of the new input leaves room for additional reasons for a missing package to be added.

Closes #20

@jon-turney
Copy link
Copy Markdown
Member

jon-turney commented Jan 13, 2026

Thanks. I really appreciate the effort in implementing this! 🎉 .

Unfortunately, I think this is the wrong place to fix this. Ideally, we'd fix this in the installer itself, so that uses outside of this action can benefit from that functionality.

There's also another problem in that (as vaguely alluded to in #20 (comment)) the way the installer currently emits this warning is wrong and can lead to false positives here.

(For example, if package X is obsoleted by package X' and then removed, requests to install X are valid and satisfiable (X is a dependency satisfying name that X' provides ("a provide")), but the current implementation in the installer just checks if X is in the set of actual package names and warns that a package named X doesn't exist.)

@kurtmckee
Copy link
Copy Markdown
Contributor Author

Ah, that's a good distinction. I was expecting this work to be useful in the case (like mine) where I request a specific Python version but it's no longer available.

For example, the python39 package will eventually disappear and be replaced with a newer version. An executable named python3 that's missing in the Cygwin bin path might exist elsewhere in the PATH, but it would not be the version I was expecting to execute, and that might be difficult to run down.

If this isn't the direction to go, I can close this PR.

This introduces a new `error-on-missing-packages` input,
which defaults to true. This is a breaking change.

Currently, only the phrase `"Package 'xyz' not found."`
is searched for in the output of the install.
The documentation of the new input leaves room for
additional reasons for a missing package to be added.

Closes cygwin#20
@kurtmckee kurtmckee force-pushed the error-on-missing-packages-issue-20 branch from 02ec0bc to 5c8d47d Compare January 21, 2026 19:47
@kurtmckee kurtmckee marked this pull request as ready for review January 21, 2026 19:47
@kurtmckee
Copy link
Copy Markdown
Contributor Author

I've rebased on master and updated the README now that #46 has merged.

I'm not convinced that this is the wrong place to implement this check, and wanted to explain my reasoning.

I anticipate that the ergonomics of Cygwin installs in GitHub is somewhat more static. From my side, I saw recently that Python 3.9 was still the default Python, though it's recently become end-of-life, and will hopefully be replaced soon.

If I create a workflow that tries to install Python 3.9 (python39), I think that I would prefer to be informed by the Cygwin install action that Python 3.9 couldn't be installed. I'm anticipating that the alternative is to have unexpected behavior later in the workflow that would require deeper investigation, like

  • broken caches for Python package downloads
  • broken cached Python virtual environments
  • not having a Python interpreter at all
  • having the Windows GitHub runner's Python interpreter for Windows -- rather than for Cygwin -- filling in the gap and manifesting platform-specific differences

However, you've got significant experience and knowledge in this area! If my reasoning is shortsighted or not convincing for any reason, let's close this in favor of waiting for the installer to gain better error messages, or a new CLI option, or both.

@jon-turney
Copy link
Copy Markdown
Member

(python39), I think that I would prefer to be informed by the Cygwin install action that Python 3.9 couldn't be installed.

Well, yes, of course. Ideally the installer would already be detecting this kind of problem.

However, given that I'm not optimistic about it growing that feature any time soon, yeah, there is some value in having this, and given that it already exists (and can be turned off, which somewhat addresses my concern about false positives), maybe applying it is the right thing to do.

I need to think about this a bit more.

@cclauss
Copy link
Copy Markdown

cclauss commented Mar 23, 2026

Huge +1 on the idea of the workflow failing on package not found. It is easy to waste time because this crucial error passes silently.

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

Successfully merging this pull request may close these issues.

Action should fail with a non-existent package name

3 participants