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!(rocks-bin/build): project lockfiles #308

Merged
merged 2 commits into from
Jan 13, 2025
Merged

Conversation

mrcjkb
Copy link
Member

@mrcjkb mrcjkb commented Jan 4, 2025

This PR:

  • Introduces a RocksPackageDB implementation using a lockfile.
  • Uses that implementation to provide reproducible project builds, with rockspec/source integrity checks.

Breaking:

  • rocks build it now builds the current project,
    using a clone of the rockspec with the project root as the source.
    This is now equivalent to luarocks make or cargo build.
  • Introduced a separate install-rockspec command for installing local rockspecs.
    • Removed the --force flag, because if we're building from a project or local rockspec, we probably always want to force.

@mrcjkb mrcjkb added the enhancement New feature or request label Jan 4, 2025
@mrcjkb mrcjkb marked this pull request as draft January 4, 2025 22:26
@mrcjkb mrcjkb force-pushed the mj/push-nllzlmkmvskx branch 3 times, most recently from 5443072 to 06db5af Compare January 5, 2025 02:03
@mrcjkb
Copy link
Member Author

mrcjkb commented Jan 5, 2025

Todos:

  • source integrity checks
  • Update the lockfile if new PackageReq are added
  • tests

@mrcjkb mrcjkb force-pushed the mj/push-nllzlmkmvskx branch 5 times, most recently from 5700eb0 to 67a1a1f Compare January 5, 2025 15:22
@mrcjkb mrcjkb changed the title feat(rocks-bin/build): project lockfiles feat!(rocks-bin/build): project lockfiles Jan 5, 2025
@mrcjkb mrcjkb force-pushed the mj/push-nllzlmkmvskx branch 5 times, most recently from a4add10 to 9443d3d Compare January 5, 2025 21:53
@vhyrro
Copy link
Contributor

vhyrro commented Jan 7, 2025

This should nicely pave way for rocks.toml, which I guess I'll undertake next :)

@mrcjkb mrcjkb force-pushed the mj/push-nllzlmkmvskx branch 2 times, most recently from 0b9987c to e7491c8 Compare January 12, 2025 17:58
@mrcjkb mrcjkb changed the base branch from master to mj/push-tnxxoptzmxzl January 12, 2025 17:59
@mrcjkb mrcjkb marked this pull request as ready for review January 12, 2025 17:59
@mrcjkb
Copy link
Member Author

mrcjkb commented Jan 12, 2025

Ready for review now :)
Stacked on #326.

If new dependencies are added, we have to fetch the source in order to add them to the lockfile.
Once #318 has been implemented, this shouldn't be a performance hit.

@mrcjkb
Copy link
Member Author

mrcjkb commented Jan 12, 2025

looks like the new test is failing in CI 😩

@mrcjkb
Copy link
Member Author

mrcjkb commented Jan 12, 2025

looks like the new test is failing in CI 😩

Should hopefully be fixed in #328.

vhyrro
vhyrro previously approved these changes Jan 12, 2025
Copy link
Contributor

@vhyrro vhyrro left a comment

Choose a reason for hiding this comment

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

Can't find any glaring issues, good stuff!

Base automatically changed from mj/push-tnxxoptzmxzl to master January 12, 2025 22:36
@mrcjkb mrcjkb dismissed vhyrro’s stale review January 12, 2025 22:36

The base branch was changed.

@vhyrro vhyrro self-requested a review January 13, 2025 10:32
vhyrro
vhyrro previously approved these changes Jan 13, 2025
@vhyrro
Copy link
Contributor

vhyrro commented Jan 13, 2025

ouch, conflicts. they don't appear to be too difficult, though. want me to tackle these?

@mrcjkb
Copy link
Member Author

mrcjkb commented Jan 13, 2025

Can't find any glaring issues, good stuff!

sure :)
Weird, I thought I had merged this

@vhyrro
Copy link
Contributor

vhyrro commented Jan 13, 2025

Okay, all done. Tests pass on my machine, let's see what the CI says.

@vhyrro
Copy link
Contributor

vhyrro commented Jan 13, 2025

ready to merge when you are @mrcjkb :p

@mrcjkb mrcjkb merged commit b3ab75d into master Jan 13, 2025
13 checks passed
@mrcjkb mrcjkb deleted the mj/push-nllzlmkmvskx branch January 13, 2025 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants