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

Fix support for .cargo/config #306

Merged
merged 1 commit into from
Aug 18, 2023
Merged

Fix support for .cargo/config #306

merged 1 commit into from
Aug 18, 2023

Conversation

Patryk27
Copy link
Contributor

@Patryk27 Patryk27 commented Aug 17, 2023

Before #300, our builtinz.toTOML used to return a string representing the serialized document which was later redirected into a file:

https://github.com/nix-community/naersk/pull/300/files#diff-b6b537316f2d29c8faf178a110366796811d1bc72f694262c7d2efad79aa984bL238

Over that merge request, this was changed to return a path, to make it consistent with how nixpkgs' formatters work - but I haven't noticed one place that still read the file instead of returning a path (which was fine before, since the code did echo ... > ..., but is not a correct thing to do for cp).

Closes #305.

nmattia
nmattia previously approved these changes Aug 17, 2023
Copy link
Collaborator

@nmattia nmattia left a comment

Choose a reason for hiding this comment

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

Thanks for the fix, and the test!

Before #300, our
`builtinz.toTOML` used to return a string representing the serialized
document which was later redirected into a file:

https://github.com/nix-community/naersk/pull/300/files#diff-b6b537316f2d29c8faf178a110366796811d1bc72f694262c7d2efad79aa984bL238

Over that merge request, this was changed to return a path, to make it
consistent with how nixpkgs' formatters work - but I haven't noticed one
place that still _read_ the file instead of returning a path (which was
fine before, since the code did `echo ... > ...`, but is not a correct
thing to do for `cp`).

Closes #305.
@Patryk27
Copy link
Contributor Author

Patryk27 commented Aug 17, 2023

Small fix: tests for nixpkgs-21.05 use an old Cargo, before support for custom environmental variables has been introduced, so I've had to adjust the new test a bit.

@Patryk27
Copy link
Contributor Author

(cc @nmattia, since GitHub requires another ✅ here 😄)

Copy link
Collaborator

@nmattia nmattia left a comment

Choose a reason for hiding this comment

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

There you go :)

@Patryk27 Patryk27 merged commit 78789c3 into master Aug 18, 2023
10 checks passed
@Patryk27 Patryk27 deleted the pr-305 branch August 18, 2023 09:40
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.

dummy-src build failed with "cp: missing file operand"
2 participants