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: Download duckdb library from GitHub #513

Closed
wants to merge 1 commit into from
Closed

feat: Download duckdb library from GitHub #513

wants to merge 1 commit into from

Conversation

krlmlr
Copy link
Collaborator

@krlmlr krlmlr commented Oct 19, 2024

To avoid the 500000 bytes boundary on CRAN.

@krlmlr krlmlr enabled auto-merge October 19, 2024 16:23
@krlmlr krlmlr disabled auto-merge October 19, 2024 16:23
@krlmlr krlmlr requested a review from hannes October 19, 2024 16:23
@hannes
Copy link
Member

hannes commented Oct 21, 2024

Should we not just get the tarball from duckdb/duckdb releases?

@krlmlr
Copy link
Collaborator Author

krlmlr commented Oct 21, 2024

We could at some point, yes. I wouldn't change it right now, for a variety of reasons.

@david-cortes
Copy link

There was some discussion about dealing with package sizes in r-polars some time ago.

Turns out some packages are able to get exceptions - example.

Perhaps you could ask CRAN maintainers for a size exception for DuckDB? Would be a lot more convenient for users if the package could keep the full source in the same style as most CRAN packages.

@krlmlr
Copy link
Collaborator Author

krlmlr commented Oct 23, 2024

Thanks, I'd like to know more about that. It's not that we can't release the package, but the release no longer is automatic. What does the polars exception look like exactly?

@eitsupi
Copy link
Contributor

eitsupi commented Oct 23, 2024

I don't think CRAN allows downloading files from the internet.
How about attaching a compressed version of the DuckDB source code?
This is what all Rust-based packages submitted to CRAN do.
https://yutani.rbind.io/post/rust-and-cran-repository-policy/#downloads-the-rust-sources

@krlmlr
Copy link
Collaborator Author

krlmlr commented Oct 23, 2024

Thanks. I remember the rule about binary files, but what about a source tarball?

xz-compressing the sources seems like a neat idea, but it will complicate the release process.

@eitsupi
Copy link
Contributor

eitsupi commented Oct 23, 2024

but what about a source tarball?

It is listed as a last option and I am not sure if CRAN will allow downloads from GitHub.
The general limit for packages is 10MB, so I don't think there is any compelling reason for duckdb, which is below 10MB and in the normal package category, to choose it.

xz-compressing the sources seems like a neat idea, but it will complicate the release process.

I think we can add the tarball to gitignore and branch the build process by the presence or absence of the tarball and only attach the tarball if we are submitting to CRAN.
prqlr has been doing that for over a year.
https://github.com/PRQL/prqlc-r/blob/2b447001d14e4ed301a9110ec8ffa3dc42e26524/src/Makevars.in#L24-L29

@krlmlr
Copy link
Collaborator Author

krlmlr commented Oct 27, 2024

It looks like I could create a ./cleanup file that is run as part of R CMD build . and xz-compresses the duckdb sources. The configure script would then extract the sources if they are compressed. That file could be added to .Rbuildignore too.

Curious if this works on Windows.

@krlmlr
Copy link
Collaborator Author

krlmlr commented Oct 27, 2024

#530

@krlmlr krlmlr closed this Oct 27, 2024
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.

4 participants