Skip to content

Conversation

@ChrisRackauckas-Claude
Copy link

Summary

This PR fixes issue #412 where Julia 1.12 triggers a deprecation warning during precompilation about the Pipe constructor being extended without explicit qualification.

Changes

  • Added explicit function Pipe end declaration before @deprecate Pipe Tube in src/Hydraulic/IsothermalCompressible/components.jl

The Problem

When compiling MTKSL under Julia 1.12, the following warning appeared:

WARNING: Constructor for type "Pipe" was extended in `IsothermalCompressible` without explicit qualification or import.
  NOTE: Assumed "Pipe" refers to `Base.Pipe`. This behavior is deprecated and may differ in future versions.

The issue occurred because @deprecate Pipe Tube was ambiguous - Julia couldn't determine if we were creating a new function or extending Base.Pipe.

The Solution

By adding function Pipe end before the deprecation, we explicitly declare that we're creating a new generic function named Pipe, not extending Base.Pipe. This follows Julia 1.12's stricter requirements for function qualification.

Testing

  • Package precompiles successfully without warnings
  • No functional changes - only clarifies intent for Julia 1.12

Closes #412

🤖 Generated with Claude Code

This commit addresses issue SciML#412 where Julia 1.12 triggers a warning
during precompilation about the Pipe constructor being extended without
explicit qualification.

The warning occurred because `@deprecate Pipe Tube` was ambiguous -
Julia couldn't determine if we were creating a new function or extending
`Base.Pipe`.

Fix: Added explicit `function Pipe end` declaration before the
deprecation to clearly indicate we're creating a new generic function,
not extending Base.Pipe.

Fixes SciML#412

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@ChrisRackauckas ChrisRackauckas merged commit 0e75c63 into SciML:main Oct 23, 2025
3 of 4 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.

Julia 12 triggers "Pipe" compilation warning for MTKSL

2 participants