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

feat!: add build/test dependencies to rocks.lock #407

Merged
merged 1 commit into from
Feb 14, 2025

Conversation

mrcjkb
Copy link
Member

@mrcjkb mrcjkb commented Feb 12, 2025

Stacked on #405

Closes #395.

@mrcjkb mrcjkb marked this pull request as draft February 12, 2025 22:51
@mrcjkb mrcjkb force-pushed the mj/push-vsvyzyyquntl branch from 8f11ae3 to 635ffb7 Compare February 12, 2025 22:52
@mrcjkb
Copy link
Member Author

mrcjkb commented Feb 12, 2025

todo:

  • Remove project_lockfile from operations::install and use operations::sync instead.
  • Sync build_dependencies in rocks build ([issue] rocks build doesn't install build_dependencies #406).
  • Sync test_dependencies in rocks test.
    • Install test_dependencies and dependencies into separate trees
    • Use operations::sync to install test dependencies
  • Use operations::sync in rocks add.
    This removes the project_lockfile from operations::install.

@mrcjkb
Copy link
Member Author

mrcjkb commented Feb 13, 2025

No idea why the integration tests are failing on Ubuntu 🥲

Perhaps we should do it like luarocks and only install test dependencies when running tests. That would mean you have to declare a dependency both in the regular dependencies and in the test dependencies if you want to use them in tests.

@vhyrro
Copy link
Contributor

vhyrro commented Feb 13, 2025

Not sure I understand the following:

That would mean you have to declare a dependency both in the regular dependencies and in the test dependencies if you want to use them in tests

If they're in the test dependencies then that means you want to use them in tests, right? :p

@mrcjkb
Copy link
Member Author

mrcjkb commented Feb 13, 2025

If they're in the test dependencies then that means you want to use them in tests, right?

The question is, do you want to be able to require a regular dependency in tests?
Intuitively, I would say yes. And that's how I'm trying to implement it in this PR.
But afaik, that's not how it works with luarocks.

@mrcjkb mrcjkb force-pushed the mj/push-vsvyzyyquntl branch 3 times, most recently from e1d3c8a to dd33cee Compare February 13, 2025 19:12
@mrcjkb
Copy link
Member Author

mrcjkb commented Feb 13, 2025

Okay now it looks like it might be luarocks.org having issues.

@mrcjkb mrcjkb force-pushed the mj/push-vsvyzyyquntl branch 3 times, most recently from 8ff119c to 7877812 Compare February 13, 2025 19:49
@mrcjkb
Copy link
Member Author

mrcjkb commented Feb 13, 2025

Ha! I figured it out.
It was two #[tokio::test]s installing busted into the same test tree. That explains the flakiness 🤭

@vhyrro
Copy link
Contributor

vhyrro commented Feb 14, 2025

If they're in the test dependencies then that means you want to use them in tests, right?

The question is, do you want to be able to require a regular dependency in tests? Intuitively, I would say yes. And that's how I'm trying to implement it in this PR. But afaik, that's not how it works with luarocks.

Yep, if you're testing functionality, and the regular dependencies are part of the functionality, then you definitely want them included too :p

@mrcjkb mrcjkb force-pushed the mj/push-kzwrpxnmrztm branch from 3b238b4 to 8f09984 Compare February 14, 2025 13:17
@mrcjkb mrcjkb force-pushed the mj/push-vsvyzyyquntl branch from 7877812 to 7db6da5 Compare February 14, 2025 13:17
@mrcjkb mrcjkb force-pushed the mj/push-vsvyzyyquntl branch from 7db6da5 to c269f7a Compare February 14, 2025 13:17
@mrcjkb mrcjkb force-pushed the mj/push-kzwrpxnmrztm branch from 8f09984 to bddea78 Compare February 14, 2025 13:17
@mrcjkb mrcjkb merged commit 8d723f2 into mj/push-kzwrpxnmrztm Feb 14, 2025
26 checks passed
@mrcjkb mrcjkb deleted the mj/push-vsvyzyyquntl branch February 14, 2025 16:49
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.

[Feature] add build/test dependencies to rocks.lock [issue] rocks build doesn't install build_dependencies
2 participants