Skip to content

Conversation

@devmotion
Copy link
Collaborator

No description provided.

@tpapp
Copy link
Owner

tpapp commented Oct 13, 2025

Thanks, but I would be totally fine with just requiring 1.12 and releasing a new version that can use public directly. This is mostly an API package, and it's not like anyone stuck on 1.11 for a while would be missing any functionality.

@devmotion
Copy link
Collaborator Author

1.11 supports public, so updating the julia compat entry to 1.11 would be sufficient.

@tpapp
Copy link
Owner

tpapp commented Oct 13, 2025

That said, you approach may be preferable since we can keep the 1.10 LTS too.

using Random: AbstractRNG, default_rng

# https://github.com/JuliaLang/julia/pull/50105
@static if VERSION >= v"1.11.0-DEV.469"
Copy link
Owner

Choose a reason for hiding this comment

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

Why not just use Compat.@compat public? I am fine with the dependency.

Copy link
Collaborator Author

@devmotion devmotion Oct 13, 2025

Choose a reason for hiding this comment

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

To avoid the dependency. IMO it's a bit annoying if simple interface packages such as LogDensityProblems introduce more dependencies than necessary. Moreover, the Compat macro doesn't do anything more than what's done in the PR explicitly: It returns an empty expression on Julia < 1.11 and an Expr(:public, ...) on Julia >= 1.11: https://github.com/JuliaLang/Compat.jl/blob/f2a3730a5dc49098dfd394ba2cbf4b202467f435/src/compatmacro.jl#L43-L50 It seemed a bit much - in particular for an interface package - to load a whole package just to get access to this trivial macro.

Copy link
Owner

Choose a reason for hiding this comment

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

Makes sense, thanks! Merging.

@tpapp tpapp merged commit b4f1f4d into master Oct 13, 2025
6 checks passed
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.

3 participants