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

[WIP] Increase minimum supported Julia version to v1.10 #2214

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

sloede
Copy link
Member

@sloede sloede commented Dec 19, 2024

Please do not merge yet until we are sure that everything still works, including downstream packages.

TODO

Copy link
Contributor

Review checklist

This checklist is meant to assist creators of PRs (to let them know what reviewers will typically look for) and reviewers (to guide them in a structured review process). Items do not need to be checked explicitly for a PR to be eligible for merging.

Purpose and scope

  • The PR has a single goal that is clear from the PR title and/or description.
  • All code changes represent a single set of modifications that logically belong together.
  • No more than 500 lines of code are changed or there is no obvious way to split the PR into multiple PRs.

Code quality

  • The code can be understood easily.
  • Newly introduced names for variables etc. are self-descriptive and consistent with existing naming conventions.
  • There are no redundancies that can be removed by simple modularization/refactoring.
  • There are no leftover debug statements or commented code sections.
  • The code adheres to our conventions and style guide, and to the Julia guidelines.

Documentation

  • New functions and types are documented with a docstring or top-level comment.
  • Relevant publications are referenced in docstrings (see example for formatting).
  • Inline comments are used to document longer or unusual code sections.
  • Comments describe intent ("why?") and not just functionality ("what?").
  • If the PR introduces a significant change or new feature, it is documented in NEWS.md with its PR number.

Testing

  • The PR passes all tests.
  • New or modified lines of code are covered by tests.
  • New or modified tests run in less then 10 seconds.

Performance

  • There are no type instabilities or memory allocations in performance-critical parts.
  • If the PR intent is to improve performance, before/after time measurements are posted in the PR.

Verification

  • The correctness of the code was verified using appropriate tests.
  • If new equations/methods are added, a convergence test has been run and the results
    are posted in the PR.

Created with ❤️ by the Trixi.jl community.

@huiyuxie
Copy link
Member

Thanks!

Copy link

codecov bot commented Dec 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.09%. Comparing base (f09a707) to head (db5526f).

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #2214       +/-   ##
===========================================
- Coverage   96.37%   81.09%   -15.29%     
===========================================
  Files         486      486               
  Lines       39186    39097       -89     
===========================================
- Hits        37764    31702     -6062     
- Misses       1422     7395     +5973     
Flag Coverage Δ
unittests 81.09% <100.00%> (-15.29%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@sloede
Copy link
Member Author

sloede commented Dec 19, 2024

It seems like only the subcell limiting tests in Trixi2Vtk.jl are affected:
https://github.com/trixi-framework/Trixi.jl/actions/runs/12408649578/job/34640720806?pr=2214

@bennibolm @amrueda Any idea what's going on or why this might be?

@sloede
Copy link
Member Author

sloede commented Dec 19, 2024

@ranocha Do you understand this error in the downgrade test?
https://github.com/trixi-framework/Trixi.jl/actions/runs/12408649811/job/34640722004?pr=2214#step:8:56

I don't understand whether it's Test.jl or Downloads.jl that's the culprit. It seems like we need to up the lower bound for at least one of them.

@JoshuaLampert
Copy link
Member

JoshuaLampert commented Dec 19, 2024

@ranocha Do you understand this error in the downgrade test?
trixi-framework/Trixi.jl/actions/runs/12408649811/job/34640722004?pr=2214#step:8:56

I don't understand whether it's Test.jl or Downloads.jl that's the culprit. It seems like we need to up the lower bound for at least one of them.

We need to skip both of them in line 75 of the Downgrade job

@JoshuaLampert
Copy link
Member

@ranocha Do you understand this error in the downgrade test?
trixi-framework/Trixi.jl/actions/runs/12408649811/job/34640722004?pr=2214#step:8:56
I don't understand whether it's Test.jl or Downloads.jl that's the culprit. It seems like we need to up the lower bound for at least one of them.

We need to skip Test.jl in line 75 of the Downgrade job

See the explanation of the skip keyword here: https://github.com/julia-actions/julia-downgrade-compat?tab=readme-ov-file#usage. All standard libraries need to be skipped.

@sloede
Copy link
Member Author

sloede commented Dec 19, 2024

@JoshuaLampert Thanks! Let's see if a133041 fixes this...

@JoshuaLampert
Copy link
Member

@JoshuaLampert Thanks! Let's see if a133041 fixes this...

Next standard library... (Random.jl) 😅

Comment on lines +84 to 87
- version: '1.11'
os: ubuntu-latest
arch: x64
trixi_test: threaded_legacy
Copy link
Member

Choose a reason for hiding this comment

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

Why did you decide to use 1.11 for this?

Copy link
Member Author

Choose a reason for hiding this comment

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

Since otherwise threaded_legacy remains unused. I thought this would be an initial and small step towards testing at least some parts on v1.11. But I can also just remove it, I have no strong opinion here either way

Project.toml Outdated
Copy link
Member

Choose a reason for hiding this comment

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

We should remove the dependency on Requires.jl - I cannot comment on the line here

Copy link
Member Author

Choose a reason for hiding this comment

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

This is only possible once we move Plots.jl into an extension. I'd rather do this in a separate PR, since I do not have the resources to do this at the moment.

Copy link
Member Author

Choose a reason for hiding this comment

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

Tracked in #2216

src/equations/equations.jl Outdated Show resolved Hide resolved
@bennibolm
Copy link
Contributor

It seems like only the subcell limiting tests in Trixi2Vtk.jl are affected: https://github.com/trixi-framework/Trixi.jl/actions/runs/12408649578/job/34640720806?pr=2214

@bennibolm @amrueda Any idea what's going on or why this might be?

If I get it correctly, those errors are somehow expected. Since we are using Julia 1.9 (and 1.7) in the test in Trixi2Vtk.jl, those numbers of the subcell limiting were calculated using 1.9.
Now, we are testing with 1.10 here. So, since the subcell numbers are very susceptible to small changes, those failing tests are expected, I think.

It should be relatively simple to fix that: Open a PR in Trixi2Vtk.jl using 1.10 instead of 1.9, download the "result files" there and push them to Trixi2Vtk_reference_files. I'm happy to help with this.

@sloede
Copy link
Member Author

sloede commented Dec 20, 2024

It seems like only the subcell limiting tests in Trixi2Vtk.jl are affected: https://github.com/trixi-framework/Trixi.jl/actions/runs/12408649578/job/34640720806?pr=2214
@bennibolm @amrueda Any idea what's going on or why this might be?

If I get it correctly, those errors are somehow expected. Since we are using Julia 1.9 (and 1.7) in the test in Trixi2Vtk.jl, those numbers of the subcell limiting were calculated using 1.9. Now, we are testing with 1.10 here. So, since the subcell numbers are very susceptible to small changes, those failing tests are expected, I think.

It should be relatively simple to fix that: Open a PR in Trixi2Vtk.jl using 1.10 instead of 1.9, download the "result files" there and push them to Trixi2Vtk_reference_files. I'm happy to help with this.

Thanks a lot for the clarification and for your offer to help! It would be great if you could prepare a similar to PR to this one here for Trixi2Vtk.jl, essentially switching over to Julia v1.10 for all testing. Once that's in place, we can also merge this PR here.

If you have questions about what needs to be changed in the CI and how, please let me know (in the PR or via Slack).

@sloede
Copy link
Member Author

sloede commented Dec 23, 2024

Thanks to @bennibolm, Trixi2Vtk.jl is now fit for Julia v1.10. What about our other major downstream packages - is it OK to bump Trixi.jl's minimum Julia version to v1.10? It would be great if you could confirm here (or let us know why not):

@huiyuxie
Copy link
Member

You @sloede should also ask me - it would be impolite to exclude me as a downstream user.

Link: https://github.com/trixi-gpu/TrixiCUDA.jl

@huiyuxie
Copy link
Member

To be fair, I feel that you are excluding me as part of our group - can you @sloede tell me why? It is disrespectful to me, and this is definitely not the first time.

Please show me the respect I deserve. Thanks @sloede

@patrickersing
Copy link
Contributor

We are already testing TrixiShallowWater.jl with Julia v1.10, so I don't expect any problems.

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.

6 participants