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

[R-package] always name the shared library 'lightgbm', not 'lib_lightgbm' #6432

Merged
merged 7 commits into from
May 1, 2024

Conversation

jameslamb
Copy link
Collaborator

@jameslamb jameslamb commented Apr 29, 2024

This proposes ensuring that the shared library for R packages builds is always called lightgbm.{dll,dylib,so}, not lib_lightgbm.{dll,dylib,so}.

Notes for Reviewers

Why not standardize on lib_lightgbm instead?

Much of the standard R tooling prefers that the main shared library for a package be named {package}.so, not lib_{package}.so. See, for example, this: https://cran.r-project.org/doc/manuals/R-exts.html#useDynLib.

That is why the package we ship to CRAN uses the library name lightgbm.{dll,dylib,so}.

Is this a breaking change?

No.

It does not change anything about the CRAN package.

For the CMake-based package, it changes the library filename but that library is only intended to be used by the {lightgbm} library, not externally linked to by any other programs.

Why did all this complexity exist in the first place?

Honestly.... because I didn't really understand CMake back when setting up this project's R packaging stuff a few years ago 😬

@jameslamb jameslamb changed the title WIP: [R-package] always name the shared library 'lightgbm', not 'lib_lightgbm' [R-package] always name the shared library 'lightgbm', not 'lib_lightgbm' May 1, 2024
@jameslamb jameslamb marked this pull request as ready for review May 1, 2024 02:27
@jameslamb jameslamb mentioned this pull request May 1, 2024
33 tasks
Copy link
Collaborator

@borchero borchero left a comment

Choose a reason for hiding this comment

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

LGTM!

@jameslamb jameslamb merged commit da9bb5f into master May 1, 2024
38 checks passed
@jameslamb jameslamb deleted the r/library-name branch May 1, 2024 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants