Skip to content

Julia 1.12 compatibility: Explicit imports for local module types#111

Open
SimonAB wants to merge 2 commits into
AlgebraicJulia:mainfrom
SimonAB:julia-1.12-constructor-fixes
Open

Julia 1.12 compatibility: Explicit imports for local module types#111
SimonAB wants to merge 2 commits into
AlgebraicJulia:mainfrom
SimonAB:julia-1.12-constructor-fixes

Conversation

@SimonAB

@SimonAB SimonAB commented Jan 8, 2026

Copy link
Copy Markdown

Description

This PR adds explicit imports for types and constructors from the local decapodes module to resolve Julia 1.12 deprecation warnings about extending constructors without explicit qualification or import.

Changes:

  • Added explicit imports: import .decapodes: Judgement, Term, Equation, Eq
  • Qualified all constructor calls and type annotations with decapodes. prefix
  • Updated pattern matches to use qualified names

Motivation

Julia 1.12 requires explicit imports when extending constructors. This change silences deprecation warnings and ensures compatibility with Julia 1.12+.

Testing

  • Package precompiles successfully on Julia 1.12
  • No deprecation warnings
  • All tests pass
  • Pattern matching with MLStyle.jl works correctly with qualified names

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 imports for Decapode, SummationDecapode from decapodeacset
- Add explicit imports for Judgement, Term, Equation from decapodes
- Qualify all constructor extensions and calls
- Resolves multiple deprecation warnings
- Compatible with Julia 1.12+
Copilot AI review requested due to automatic review settings January 8, 2026 22:28

Copilot AI left a comment

Copy link
Copy Markdown

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 adds explicit imports and qualified names for types and constructors from local modules to ensure Julia 1.12 compatibility. Julia 1.12 introduced stricter requirements for extending constructors from other modules, requiring either explicit imports or fully qualified names.

Key changes:

  • Added explicit imports for Judgement, Term, Equation, and Eq from the decapodes module
  • Added explicit imports for Decapode and SummationDecapode from the decapodeacset module
  • Qualified all constructor calls and type annotations in pattern matching with module prefixes (e.g., decapodes.Judgement, decapodes.Eq)

Reviewed changes

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

File Description
src/DiagrammaticEquations.jl Adds import statement for Decapode and SummationDecapode constructors from decapodeacset module with explanatory comment about include order
src/language.jl Adds explicit imports from decapodes module and qualifies all constructor calls, type annotations, and pattern matches with decapodes. or decapodeacset. prefixes
src/colanguage.jl Qualifies all constructor calls with decapodes. prefix and extends decapodes.Term using qualified function definition syntax

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

Comment thread src/colanguage.jl
Comment thread src/language.jl
SimonAB added a commit to SimonAB/DiagrammaticEquations.jl that referenced this pull request Jan 8, 2026
- Update colanguage.jl comment to mention @intertypes macro
- Update language.jl comment to clarify Eq is a constructor variant of Equation sum type
- Both comments now accurately reflect the code structure
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