Skip to content

Methods overwritten in extensions #914

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

Open
RGonTheNoble opened this issue May 13, 2025 · 6 comments
Open

Methods overwritten in extensions #914

RGonTheNoble opened this issue May 13, 2025 · 6 comments
Labels
bug Something isn't working

Comments

@RGonTheNoble
Copy link

I'm getting a method-overwrite error when precompiling the package:

WARNING: Method definition getproperty(SciMLBase.AbstractOptimizationCache, Symbol) in module SciMLBase at /home/user/.julia/packages/SciMLBase/JKXkh/src/solutions/optimization_solutions.jl:136 overwritten in module Optimization at /home/user/.julia/packages/Optimization/fPVIW/src/cache.jl:2.
ERROR: Method overwriting is not permitted during Module precompilation. Use __precompile__(false) to opt-out of precompilation.

Environment:

  • Output of using Pkg; Pkg.status()
Status `~/Documents/Git Repos/carbon-calculation-engine/Project.toml`
  [7d9f7c33] Accessors v0.1.42
  [7c7805af] Clapeyron v0.6.12
  [76e01b6b] FlexUnits v0.1.3
  [f6369f11] ForwardDiff v1.0.1
  [0f8b85d8] JSON3 v1.14.2
⌃ [7f7a1694] Optimization v3.19.3
  [90137ffa] StaticArrays v1.9.13
  [b543fe20] TimeRecords v2.0.1
  [e88e6eb3] Zygote v0.7.7
  [ade2ca70] Dates v1.11.0
  [37e2e46d] LinearAlgebra v1.11.0
  [2f01184e] SparseArrays v1.11.0
Info Packages marked with ⌃ have new versions available and may be upgradable.
  • Output of using Pkg; Pkg.status(; mode = PKGMODE_MANIFEST)
⌅ [47edcb42] ADTypes v0.2.7
  [621f4979] AbstractFFTs v1.5.0
  [1520ce14] AbstractTrees v0.4.5
  [7d9f7c33] Accessors v0.1.42
  [79e6a3ab] Adapt v4.3.0
  [66dad0bd] AliasTables v1.1.3
  [4fba245c] ArrayInterface v7.19.0
  [a134a8b2] BlackBoxOptim v0.6.3
  [a9c8d775] CPUTime v1.0.0
  [336ed68f] CSV v0.10.15
  [082447d4] ChainRules v1.72.3
  [d360d2e6] ChainRulesCore v1.25.1
  [7c7805af] Clapeyron v0.6.12
  [944b1d66] CodecZlib v0.7.8
  [38540f10] CommonSolve v0.2.4
  [bbf7d656] CommonSubexpressions v0.3.1
  [34da2185] Compat v4.16.0
  [a33af91c] CompositionsBase v0.1.2
  [88cd18e8] ConsoleProgressMonitor v0.1.2
  [187b0558] ConstructionBase v1.5.8
  [a8cc5b0e] Crayons v4.1.1
  [9a962f9c] DataAPI v1.16.0
  [864edb3b] DataStructures v0.18.22
  [e2d170a0] DataValueInterfaces v1.0.0
  [163ba53b] DiffResults v1.1.0
  [b552c78f] DiffRules v1.15.1
  [31c24e10] Distributions v0.25.120
  [ffbed154] DocStringExtensions v0.9.4
  [4e289a0a] EnumX v1.0.5
  [e2ba6199] ExprTools v0.1.10
  [55351af7] ExproniconLite v0.10.14
  [48062228] FilePathsBase v0.9.24
  [1a297f60] FillArrays v1.13.0
  [76e01b6b] FlexUnits v0.1.3
  [f6369f11] ForwardDiff v1.0.1
  [069b7b12] FunctionWrappers v1.1.3
  [77dc65aa] FunctionWrappersWrappers v0.1.3
  [46192b85] GPUArraysCore v0.2.0
  [34004b35] HypergeometricFunctions v0.3.28
  [7869d1d1] IRTools v0.4.14
  [842dd82b] InlineStrings v1.4.3
  [3587e190] InverseFunctions v0.1.17
  [92d709cd] IrrationalConstants v0.2.4
  [42fd0dbc] IterativeSolvers v0.9.4
  [82899510] IteratorInterfaceExtensions v1.0.0
  [692b3bcd] JLLWrappers v1.7.0
  [682c06a0] JSON v0.21.4
  [0f8b85d8] JSON3 v1.14.2
  [ae98c720] Jieko v0.2.1
  [b964fa9f] LaTeXStrings v1.4.0
  [1d6d02ad] LeftChildRightSiblingTrees v0.2.0
  [2ab3a3ac] LogExpFunctions v0.3.29
  [e6f89c97] LoggingExtras v1.1.0
  [1914dd2f] MacroTools v0.5.16
  [e1d29d7a] Missings v1.2.0
  [2e0e35c7] Moshi v0.3.5
  [337daf1e] NLSolvers v0.5.0
  [77ba4419] NaNMath v1.1.3
⌃ [7f7a1694] Optimization v3.19.3
  [bac558e1] OrderedCollections v1.8.0
  [90014a1f] PDMats v0.11.35
  [7713531c] PackedVectorsOfVectors v0.1.2
  [69de0a69] Parsers v2.8.3
  [2dfb63ee] PooledArrays v1.4.3
  [85a6dd25] PositiveFactorizations v0.2.4
⌅ [aea7be01] PrecompileTools v1.2.1
  [21216c6a] Preferences v1.4.3
  [08abe8d2] PrettyTables v2.4.0
  [33c8b6b6] ProgressLogging v0.1.4
  [92933f4c] ProgressMeter v1.10.4
  [43287f4e] PtrArrays v1.3.0
  [1fd47b50] QuadGK v2.11.2
  [c1ae055f] RealDot v0.1.0
  [3cdcf5f2] RecipesBase v1.3.4
  [731186ca] RecursiveArrayTools v3.33.0
  [189a3867] Reexport v1.2.2
  [ae029012] Requires v1.3.1
  [79098fc4] Rmath v0.8.0
  [f2b01f46] Roots v2.2.7
  [7e49a35a] RuntimeGeneratedFunctions v0.5.14
  [0bca4576] SciMLBase v2.89.1
  [c0aeaf25] SciMLOperators v0.4.0
  [53ae85a6] SciMLStructures v1.7.0
  [6c6a2e73] Scratch v1.2.1
  [91c51154] SentinelArrays v1.4.8
  [a2af1166] SortingAlgorithms v1.2.1
  [dc90abb0] SparseInverseSubset v0.1.2
  [d4ead438] SpatialIndexing v0.1.6
  [276daf66] SpecialFunctions v2.5.1
  [91464d47] StableTasks v0.1.7
  [90137ffa] StaticArrays v1.9.13
  [1e83bf80] StaticArraysCore v1.4.3
  [10745b16] Statistics v1.11.1
  [82ae8749] StatsAPI v1.7.0
  [2913bbd2] StatsBase v0.34.5
  [4c63d2b9] StatsFuns v1.5.0
  [892a3eda] StringManipulation v0.4.1
  [09ab397b] StructArrays v0.7.1
  [856f2bd8] StructTypes v1.11.0
  [2efcf032] SymbolicIndexingInterface v0.3.40
  [3783bdb8] TableTraits v1.0.1
  [bd369af6] Tables v1.12.0
  [5d786b92] TerminalLoggers v0.1.7
  [b543fe20] TimeRecords v2.0.1
  [3bb67fe8] TranscodingStreams v0.11.3
  [ea10d353] WeakRefStrings v1.4.2
  [76eceee3] WorkerUtilities v1.6.1
  [e88e6eb3] Zygote v0.7.7
  [700de1a5] ZygoteRules v0.2.7
  [efe28fd5] OpenSpecFun_jll v0.5.6+0
  [f50d1b31] Rmath_jll v0.5.1+0
  [0dad84c5] ArgTools v1.1.2
  [56f22d72] Artifacts v1.11.0
  [2a0f44e3] Base64 v1.11.0
  [ade2ca70] Dates v1.11.0
  [8ba89e20] Distributed v1.11.0
  [f43a241f] Downloads v1.6.0
  [7b1f6079] FileWatching v1.11.0
  [9fa8497b] Future v1.11.0
  [b77e0a4c] InteractiveUtils v1.11.0
  [b27032c2] LibCURL v0.6.4
  [76f85450] LibGit2 v1.11.0
  [8f399da3] Libdl v1.11.0
  [37e2e46d] LinearAlgebra v1.11.0
  [56ddb016] Logging v1.11.0
  [d6f4376e] Markdown v1.11.0
  [a63ad114] Mmap v1.11.0
  [ca575930] NetworkOptions v1.2.0
  [44cfe95a] Pkg v1.11.0
  [de0858da] Printf v1.11.0
  [9a3f8284] Random v1.11.0
  [ea8e919c] SHA v0.7.0
  [9e88b42a] Serialization v1.11.0
  [6462fe0b] Sockets v1.11.0
  [2f01184e] SparseArrays v1.11.0
  [4607b0f0] SuiteSparse
  [fa267f1f] TOML v1.0.3
  [a4e569a6] Tar v1.10.0
  [cf7118a7] UUIDs v1.11.0
  [4ec0a83e] Unicode v1.11.0
  [e66e0078] CompilerSupportLibraries_jll v1.1.1+0
  [deac9b47] LibCURL_jll v8.6.0+0
  [e37daf67] LibGit2_jll v1.7.2+0
  [29816b5a] LibSSH2_jll v1.11.0+1
  [c8ffd9c3] MbedTLS_jll v2.28.6+0
  [14a3606d] MozillaCACerts_jll v2023.12.12
  [4536629a] OpenBLAS_jll v0.3.27+1
  [05823500] OpenLibm_jll v0.8.5+0
  [bea87d4a] SuiteSparse_jll v7.7.0+0
  [83775a58] Zlib_jll v1.2.13+1
  [8e850b90] libblastrampoline_jll v5.11.0+0
  [8e850ede] nghttp2_jll v1.59.0+0
  [3f19e933] p7zip_jll v17.4.0+2
  • Output of versioninfo()
Julia Version 1.11.5
Commit 760b2e5b739 (2025-04-14 06:53 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 22 × Intel(R) Core(TM) Ultra 7 165H
  WORD_SIZE: 64
  LLVM: libLLVM-16.0.6 (ORCJIT, alderlake)
Threads: 22 default, 0 interactive, 11 GC (on 22 virtual cores)
Environment:
  JULIA_EDITOR = code
  JULIA_VSCODE_REPL = 1

Additional context

Add any other context about the problem here.

@RGonTheNoble RGonTheNoble added the bug Something isn't working label May 13, 2025
@SebastianM-C
Copy link
Contributor

It looks like you have an old version of Optimization. Can you try updating to [email protected]?
Does ]add [email protected] work for you?

@RGonTheNoble
Copy link
Author

RGonTheNoble commented May 13, 2025

Yes, it does. Although because I was using this inside a package, I had to add a compat entry of 4.0 which solved the issue. This forced a downgrade of ForwardDiff and Zygote I think, which I'm perfectly fine with.

@SebastianM-C
Copy link
Contributor

Yeah, that's expected. Those version bumps are still being worked on in SciML. You probably got the older version because some packages were not strict enough with the compat bounds.

@ChrisRackauckas
Copy link
Member

ForwardDiff is still being worked through. I don't think anything is blocking Zygote though?

@SebastianM-C
Copy link
Contributor

Ah, nice. In that case, @RGonTheNoble using ]add [email protected] should either work or tell you what's holding it back

@RGonTheNoble
Copy link
Author

Adding the compat entry
Optimization = "4.0"
Added a second one
Zygote = "0.7.7"
and everything worked afterwards! Thanks! Moreover, thanks for all the hard work you're doing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants