Skip to content

add support for CoolProp_jll v8.0.0 - #49

Open
longemen3000 wants to merge 1 commit into
CoolProp:masterfrom
longemen3000:patch-2
Open

add support for CoolProp_jll v8.0.0#49
longemen3000 wants to merge 1 commit into
CoolProp:masterfrom
longemen3000:patch-2

Conversation

@longemen3000

@longemen3000 longemen3000 commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

needs JuliaPackaging/Yggdrasil#14076 first.

Summary by CodeRabbit

  • Chores
    • Expanded compatibility with a newer version of a core dependency, helping the project work with the latest supported releases.
    • No user-facing interface changes were introduced.

@coderabbitai

coderabbitai Bot commented Jun 28, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 45f16e45-db53-465a-81ed-c8a64b8ea5b9

📥 Commits

Reviewing files that changed from the base of the PR and between 46a2496 and 1af36db.

📒 Files selected for processing (1)
  • Project.toml

📝 Walkthrough

Walkthrough

Project.toml expands the CoolProp_jll version specifier to include 8.0 alongside the existing 6.6 and 7.1 entries.

CoolProp_jll Version Bump

Layer / File(s) Summary
CoolProp_jll compat expansion
Project.toml
Adds 8.0 to the [deps] version list for CoolProp_jll, extending compatibility from "6.6, 7.1" to "6.6, 7.1, 8.0".

🐇 A version grows, from seven to eight,
The jll expands — oh, isn't that great?
One line in the toml, a small little thing,
But new compat means new joy it will bring!
Hop hop, said the rabbit, and merged it with glee! 🎉

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: adding support for CoolProp_jll v8.0.0.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@barche

barche commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Local test (and presumably the now running CI) fails with:

ERROR: LoadError: CoolProp: Error: fugacity_coefficient is not well-defined in the two-phase region; evaluate on SatL or SatV instead
Stacktrace:
  [1] error(::String, ::String)
    @ Base ./error.jl:54
  [2] raise(errcode::Base.RefValue{Int64}, message_buffer::Vector{UInt8})
    @ CoolProp ~/src/julia/pkgdev/CoolProp/src/CoolProp.jl:746
  [3] AbstractState_get_fugacity_coefficient(handle::Int64, i::Int64)
    @ CoolProp ~/src/julia/pkgdev/CoolProp/src/CoolProp.jl:982
  [4] top-level scope
    @ ~/src/julia/pkgdev/CoolProp/test/testLow.jl:79
  [5] include(mapexpr::Function, mod::Module, _path::String)
    @ Base ./Base.jl:307
  [6] top-level scope
    @ ~/src/julia/pkgdev/CoolProp/test/runtests.jl:55
  [7] include(mapexpr::Function, mod::Module, _path::String)
    @ Base ./Base.jl:307
  [8] top-level scope
    @ none:6
  [9] eval(m::Module, e::Any)
    @ Core ./boot.jl:489
 [10] exec_options(opts::Base.JLOptions)
    @ Base ./client.jl:283
 [11] _start()
    @ Base ./client.jl:550

It's not clear to me how to fix this.

@longemen3000

longemen3000 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

curious how it works for fugacity but not for fugacity_coefficient. the error comes from here:

https://github.com/CoolProp/CoolProp/blob/b72bc234801835834031cb06af694c89b3be9f73/src/Backends/Helmholtz/HelmholtzEOSMixtureBackend.cpp#L3470-L3501

@longemen3000

Copy link
Copy Markdown
Contributor Author

This should be fixed in CoolProp/CoolProp#3262, so i think we need to wait up until the next library release.

@ibell

ibell commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Is there a way to hook the julia unit tests into the CoolProp ones?

@longemen3000

longemen3000 commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

it is not too hard (i did it in a different way before in Clapeyron), but it would require some changes in the package:

This line is the main interaction:

https://github.com/CoolProp/CoolProp.jl/blob/46a2496e77c673ea4782927eacb23364fa92e25d/src/CoolProp.jl#L5

CoolProp_jll (CoolProp distributed via the julia package manager) loads libcoolprop, that is used across every function call in the wrapper. and, libcoolprop is just a string with the path to the dynamic library:

julia> using CoolProp_jll: libcoolprop

julia> libcoolprop
"C:\\Users\\user\\.julia\\artifacts\\903b5a870bacd5fe7c398126c02a132fe726a08d\\bin\\libCoolProp.dll"

One could use Preferences.jl to change libcoolprop from the one provided by the jll package to one provided by any dynamic library:

import CoolProp_jll #in this way, we do not import libcoolprop into the module. until asked

 #Preferences was introduced in julia 1.6, this package supports even older versions of julia (last LTS version is 1.10)
@static if VERSION >= v"1.6"
    using Preferences
end

@static if VERSION >= v"1.6"
    const libcoolprop = @load_preference("coolprop_library", CoolProp_jll.libcoolprop)
else
    const libcoolprop = CoolProp_jll.libcoolprop
end

The only thing missing is the loading, probably a github worker could be written here that checks the coolprop master once a day and runs the tests with that library instead of the one provided by the package manager.

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