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!: luarocks build backend / compatibility layer #253

Merged
merged 3 commits into from
Dec 17, 2024

Conversation

mrcjkb
Copy link
Member

@mrcjkb mrcjkb commented Dec 10, 2024

Important

This is a breaking change, as rocks are now installed in a tree subdirectory of the rocks data directory.

This PR's implementation assumes that luarocks build backends don't use other custom build backends to build,
which I think is a pretty safe assumption.

@mrcjkb mrcjkb marked this pull request as draft December 10, 2024 21:22
@mrcjkb mrcjkb force-pushed the mj/push-vwkrwryqvsrk branch from 8da4911 to 1569194 Compare December 13, 2024 16:45
@mrcjkb mrcjkb force-pushed the mj/push-ulzzwstwyozu branch from ecd78aa to 9b7741d Compare December 13, 2024 16:45
@mrcjkb mrcjkb force-pushed the mj/push-vwkrwryqvsrk branch 2 times, most recently from 858c5e7 to 43e966c Compare December 13, 2024 16:47
@mrcjkb mrcjkb force-pushed the mj/push-ulzzwstwyozu branch from 843b300 to 73766f3 Compare December 13, 2024 16:47
@mrcjkb mrcjkb force-pushed the mj/push-vwkrwryqvsrk branch 8 times, most recently from 5f78f6e to a61e2cc Compare December 14, 2024 14:52
Base automatically changed from mj/push-ulzzwstwyozu to master December 14, 2024 14:53
@mrcjkb mrcjkb force-pushed the mj/push-vwkrwryqvsrk branch 5 times, most recently from 73f561c to 6fc34f3 Compare December 14, 2024 19:56
@mrcjkb mrcjkb marked this pull request as ready for review December 14, 2024 19:56
@mrcjkb mrcjkb force-pushed the mj/push-vwkrwryqvsrk branch from 6fc34f3 to 5681236 Compare December 14, 2024 19:57
@mrcjkb mrcjkb changed the title feat: luarocks build backend feat!: luarocks build backend Dec 14, 2024
@mrcjkb mrcjkb force-pushed the mj/push-vwkrwryqvsrk branch from 5681236 to 2e39ada Compare December 14, 2024 20:16
@mrcjkb mrcjkb force-pushed the mj/push-vwkrwryqvsrk branch from 2e39ada to 70c3fa9 Compare December 15, 2024 20:22
@mrcjkb mrcjkb changed the title feat!: luarocks build backend feat!: luarocks build backend / compatibility layer Dec 15, 2024
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.

amazing work!

Comment on lines +30 to +47
pub(crate) fn recursive_copy_dir(src: &PathBuf, dest: &Path) -> Result<(), io::Error> {
if src.exists() {
for file in walkdir::WalkDir::new(src)
.into_iter()
.flatten()
.filter(|file| file.file_type().is_file())
{
let relative_src_path: PathBuf =
pathdiff::diff_paths(src.join(file.clone().into_path()), src)
.expect("failed to copy directories!");
let filepath = file.path();
let target = dest.join(relative_src_path);
std::fs::create_dir_all(target.parent().unwrap())?;
std::fs::copy(filepath, target)?;
}
}
Ok(())
}
Copy link
Contributor

Choose a reason for hiding this comment

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

nit(for a different PR): I believe we already vendor (or wanted to vendor) a library that has a recursive copy function with the ability to add globs to customize the output.

@vhyrro vhyrro merged commit 40d62c8 into master Dec 17, 2024
13 checks passed
@vhyrro vhyrro deleted the mj/push-vwkrwryqvsrk branch December 17, 2024 08:48
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