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

dos2unix: explicitly set mainProgram to dos2unix #295

Merged
merged 1 commit into from
Jan 5, 2025

Conversation

sebaszv
Copy link
Contributor

@sebaszv sebaszv commented Jan 5, 2025

The package dos2unix doesn't have meta.mainProgram
defined since it includes several binaries.

At present lib.getExe was inferring that we wanted the
path to dos2unix.

Here we now specify that we want dos2unix, avoiding
what is specified in the evaluation warning:

evaluation warning: getExe: Package "dos2unix-7.5.2" does not have
the meta.mainProgram attribute. We'll assume that the main program
has the same name for now, but this behavior is deprecated, because
it leads to surprising errors when the assumption does not hold. If
the package has a main program, please set meta.mainProgram in its
definition to make this warning go away. Otherwise, if the package
does not have a main program, or if you don't control its definition,
use getExe' to specify the name to the program, such as
lib.getExe' foo "bar".

@sebaszv sebaszv force-pushed the dosunix_set-mainProgram branch 3 times, most recently from d942725 to 110ae33 Compare January 5, 2025 19:49
@sebaszv sebaszv changed the title dos2unix: explicitly set 'mainProgram' to 'dos2unix' dos2unix: explicitly set mainProgram to dos2unix Jan 5, 2025
The package `dos2unix` doesn't have `meta.mainProgram`
defined since it includes several binaries.

At present `lib.getExe` was inferring that we wanted the
path to `dos2unix`.

Here we now specify that we want `dos2unix`, avoiding
what is specified in the evaluation warning:

> *evaluation warning:* `getExe`: Package "dos2unix-7.5.2" does not have
> the `meta.mainProgram` attribute. We'll assume that the main program
> has the same name for now, but this behavior is deprecated, because
> it leads to surprising errors when the assumption does not hold. If
> the package has a main program, please set `meta.mainProgram` in its
> definition to make this warning go away. Otherwise, if the package
> does not have a main program, or if you don't control its definition,
> use `getExe'` to specify the name to the program, such as
> `lib.getExe' foo "bar"`.

I also added myself to the maintainers list.
@sebaszv sebaszv force-pushed the dosunix_set-mainProgram branch from 110ae33 to 2027acc Compare January 5, 2025 19:51
Copy link
Member

@zimbatm zimbatm left a comment

Choose a reason for hiding this comment

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

Alright thanks!

@zimbatm zimbatm merged commit b2cef38 into numtide:main Jan 5, 2025
3 checks passed
@sebaszv sebaszv deleted the dosunix_set-mainProgram branch January 5, 2025 22:11
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.

2 participants