Skip to content

Julia 1.12 compatibility: Explicit import for Pointf constructor#244

Closed
SimonAB wants to merge 5 commits intoMakieOrg:masterfrom
SimonAB:julia-1.12-constructor-fixes
Closed

Julia 1.12 compatibility: Explicit import for Pointf constructor#244
SimonAB wants to merge 5 commits intoMakieOrg:masterfrom
SimonAB:julia-1.12-constructor-fixes

Conversation

@SimonAB
Copy link
Copy Markdown

@SimonAB SimonAB commented Jan 8, 2026

Description

This PR adds an explicit import for GeometryBasics.Pointf to resolve Julia 1.12 deprecation warnings about extending constructors without explicit qualification or import.

Change: Added import GeometryBasics: Pointf to src/GraphMakie.jl

Motivation

Julia 1.12 requires explicit imports when extending constructors. This change silences the deprecation warning:

WARNING: extending constructor without explicit qualification or import

The warning was triggered by Point\{N,Float32\} helpers in utils.jl that extend the Pointf constructor.

Additional Changes

  • Updated Graphs compat from "1.4" to "1" to allow latest Graphs.jl versions

Testing

  • Package precompiles successfully on Julia 1.12
  • No deprecation warnings
  • All tests pass

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

  • 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.

Note: This is a compatibility fix that doesn't require documentation changes or new tests.

- Add explicit import GeometryBasics: Pointf
- Resolves deprecation warning about unqualified constructor extension
- Compatible with Julia 1.12+
Changed from '1.4' to '1' to allow upgrading to latest Graphs versions
(up to 1.13.3) while maintaining compatibility.
GraphMakie doesn't directly depend on Agents, but a transitive dependency
constrains it. Adding explicit Agents compat allows newer Agents versions
(up to 6.x) to work with GraphMakie.
Copilot AI review requested due to automatic review settings January 8, 2026 22:28
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses Julia 1.12 compatibility by adding an explicit import for GeometryBasics.Pointf to resolve deprecation warnings related to constructor extension, and updates package compatibility constraints for Graphs.jl.

  • Adds explicit import GeometryBasics: Pointf to silence Julia 1.12 deprecation warnings
  • Updates Graphs compatibility from "1.4" to "1" to allow broader version support
  • Adds Agents compatibility constraint to address transitive dependency issues

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.

File Description
src/GraphMakie.jl Adds explicit import for Pointf with explanatory comment to address Julia 1.12 deprecation warning
Project.toml Updates Graphs compat to "1" and adds Agents compat constraint for transitive dependency resolution

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Similar to Makie.jl, Pkg doesn't allow compat entries for packages
that aren't direct dependencies. Removing the Agents compat entry.
@SimonAB SimonAB closed this Jan 8, 2026
@SimonAB SimonAB deleted the julia-1.12-constructor-fixes branch January 8, 2026 23:18
@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.53%. Comparing base (01b22a4) to head (6f2a89b).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #244   +/-   ##
=======================================
  Coverage   78.53%   78.53%           
=======================================
  Files           5        5           
  Lines         764      764           
=======================================
  Hits          600      600           
  Misses        164      164           

☔ 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.

@SimonAB SimonAB restored the julia-1.12-constructor-fixes branch January 9, 2026 16:54
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.

2 participants