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

Use Base.depwarn() exclusively, and fix deprecation tests #4333

Merged
merged 2 commits into from
Sep 18, 2024

Conversation

JamesWrigley
Copy link
Contributor

Description

Partially fixes #4308.

A few changes:

  • Use Base.depwarn() instead of Base.@deprecate_binding to avoid warnings when importing symbols.
  • Pass the missing funcsym argument to Base.depwarn() in Combined().
  • Fix the deprecation tests. Most of them were actually getting skipped because @depwarn_message had a return statement, causing the entire testset to return early as soon as the passed expression was evaluated.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

(I don't think this needs a changelog entry?)

  • Added an entry in CHANGELOG.md (for new features and breaking changes)
  • Added or changed relevant sections in the documentation
  • Added unit tests for new algorithms, conversion methods, etc.
  • Added reference image tests for new plotting functions, recipes, visual options, etc.

A few changes:
- Use `Base.depwarn()` instead of `Base.@deprecate_binding` to avoid warnings
  when importing symbols.
- Pass the missing `funcsym` argument to `Base.depwarn()` in `Combined()`.
- Fix the deprecation tests. Most of them were actually getting skipped because
  `@depwarn_message` had a `return` statement, causing the entire testset to
  return early as soon as the passed expression was evaluated.
Base.@deprecate_binding ContinuousSurface VertexGrid true

function DiscreteSurface(args...; kwargs...)
Base.depwarn("Makie.DiscreteSurface() is deprecated, use Makie.CellGrid() instead", :DiscreteSurface)
Copy link
Member

Choose a reason for hiding this comment

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

Should we actually make this a warning with maxlog=1?
Every time we remove deprecations in a breaking version, people are confused why suddenly things are broken without a warning, since depwarns are turned off almost everywhere it matters for a plotting package.

Copy link
Member

Choose a reason for hiding this comment

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

yeah I think that's better

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, changed to @warn in 5c3829c.

@SimonDanisch SimonDanisch merged commit b971fbb into MakieOrg:master Sep 18, 2024
17 of 18 checks passed
@SimonDanisch
Copy link
Member

Thanks :)

@JamesWrigley JamesWrigley deleted the deprecations branch September 18, 2024 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Merged
Development

Successfully merging this pull request may close these issues.

Precompilation warnings
3 participants