Skip to content

Conversation

@Ickaser
Copy link
Contributor

@Ickaser Ickaser commented Aug 28, 2025

Description

This depends on JuliaPhysics/Unitful.jl#795 , which makes UnitfulLatexify into a LatexifyExt for Unitful. Once that is merged and released, Plots can drop UnitfulLatexify as a dependency in both v1 and v2.

Once the Unitful release is out, the compat bound here will have to be set to match. I am not sure yet if it will be 1.25 or 1.26.

Arguably, dropping support for UnitfulLatexify altogether (which this is doing) could be considered a breaking change for some users. But it's not breaking the Plots API, exactly, and we're not breaking API for Unitful or Latexify either, so the breaking change is in UnitfulLatexify, which will have a deprecation notice. (And the fix should be pretty simple for the handful of people who run into it.)

I want this change in v1 and not just v2 because then it can be used in the Unitful docs, which use the Latexify extension and demonstrate how the Latexify extension can be used with Plots.

Attribution

@giordano
Copy link
Contributor

Bump

@codecov
Copy link

codecov bot commented Sep 17, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.57%. Comparing base (fa65e7d) to head (b72d200).
⚠️ Report is 78 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5174      +/-   ##
==========================================
- Coverage   89.77%   88.57%   -1.20%     
==========================================
  Files          40       40              
  Lines        8780     8884     +104     
==========================================
- Hits         7882     7869      -13     
- Misses        898     1015     +117     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Ickaser
Copy link
Contributor Author

Ickaser commented Sep 17, 2025

The test failures occur for 1.6 (where the Latexify extension does not load, so of course latexify tests fail), and downstream in GraphRecipes.jl where the julia_type_tree plot doesn't match an old version. The GraphRecipes one maybe deserves its own issue and PR, but is it alright if I set the Unitful+Latexify tests to only run on Julia 1.9+?

@sostock
Copy link

sostock commented Sep 17, 2025

Is there any functionality lost on Julia 1.6 or are only the tests failing? If the functionality is lost, should it be considered breaking?

One way to keep all functionality on Julia 1.6 would be to change UnitfulLatexify v2 to contain a copy of the extension on Julia < 1.9. Only on Julia ≥ 1.9 would the package be empty. Plots would then depend on UnitfulLatexify v2. It’s not particularly nice (especially since one has to continue to maintain UnitfulLatexify parallel to the Unitful extension), but I think it should work.

@Ickaser
Copy link
Contributor Author

Ickaser commented Sep 17, 2025

Is there any functionality lost on Julia 1.6 or are only the tests failing? If the functionality is lost, should it be considered breaking?

One way to keep all functionality on Julia 1.6 would be to change UnitfulLatexify v2 to contain a copy of the extension on Julia < 1.9. Only on Julia ≥ 1.9 would the package be empty. Plots would then depend on UnitfulLatexify v2. It’s not particularly nice (especially since one has to continue to maintain UnitfulLatexify parallel to the Unitful extension), but I think it should work.

The functionality is lost, unfortunately. Making UnitfulLatexify somehow load the extension even on less than 1.6 could resolve this, although my gut says it makes compat more confusing. Or including a similar hack in the Plots UnitfulExt could resolve it just for Plots.

@Ickaser
Copy link
Contributor Author

Ickaser commented Sep 17, 2025

Some local testing on my part suggests that with a potentially fragile hack to load the extension in gustaphe/UnitfulLatexify.jl#22, putting UnitfulLatexify back in as a nearly-empty package works. At least, the tests that are failing here pass when I load this PR and that PR in Julia 1.6, WSL Ubuntu. The most recent test failure here is because UnitfulLatexify v2.0 isn't merged and registered yet.

@BeastyBlacksmith
Copy link
Member

I think it would also be okay to drop Julia 1.6 support at this point of time

@Ickaser
Copy link
Contributor Author

Ickaser commented Sep 18, 2025

I think it would also be okay to drop Julia 1.6 support at this point of time

OK. I'll make that change in this PR, then, if everything else looks alright? I put that in #5184 in case it needs to be its own conversation.

@Ickaser Ickaser force-pushed the drop-unitful-latexify-dep branch from b72d200 to 035ed3a Compare September 22, 2025 13:22
@Ickaser
Copy link
Contributor Author

Ickaser commented Sep 22, 2025

Remaining test failures here now that #5184 is merged and this is rebased are just due to the julia_type_tree test image of GraphRecipes, so unrelated to this PR.

@BeastyBlacksmith BeastyBlacksmith merged commit 075862c into JuliaPlots:master Sep 22, 2025
9 of 12 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.

4 participants