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

LoadError: type Nothing has no field _conj #158

Closed
Yue-Zhengyuan opened this issue Oct 17, 2024 · 8 comments
Closed

LoadError: type Nothing has no field _conj #158

Yue-Zhengyuan opened this issue Oct 17, 2024 · 8 comments

Comments

@Yue-Zhengyuan
Copy link

On Julia 1.11.1, I get the following error when building TensorKit:

(@v1.11) pkg> precompile
Precompiling project...
  ✗ TensorKit → TensorKitChainRulesCoreExt
  0 dependencies successfully precompiled in 1 seconds. 466 already precompiled.

ERROR: The following 1 direct dependency failed to precompile:

TensorKitChainRulesCoreExt 

Failed to precompile TensorKitChainRulesCoreExt [74f4665c-2d76-51f1-bd11-a86ebbb150d0] to "/Users/zhengyuanyue/.julia/compiled/v1.11/TensorKitChainRulesCoreExt/jl_uJjNv9".
ERROR: LoadError: type Nothing has no field _conj
Stacktrace:
 [1] getproperty(x::Nothing, f::Symbol)
   @ Base ./Base.jl:49
 [2] top-level scope
   @ ~/.julia/packages/TensorKit/59D34/ext/TensorKitChainRulesCoreExt/TensorKitChainRulesCoreExt.jl:19
 [3] include
   @ ./Base.jl:557 [inlined]
 [4] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::Nothing)
   @ Base ./loading.jl:2790
 [5] top-level scope
   @ stdin:5
in expression starting at /Users/zhengyuanyue/.julia/packages/TensorKit/59D34/ext/TensorKitChainRulesCoreExt/TensorKitChainRulesCoreExt.jl:1
in expression starting at stdin:

Package versions:

[07d1fe3e] TensorKit v0.12.6
⌅ [6aa20fa7] TensorOperations v4.1.1
@lkdvos
Copy link
Collaborator

lkdvos commented Oct 17, 2024

Aha, I see that my "extension hacking" has finally come to bite me in the backside...

It looks like julia 1.11.1 made some changes to the order of loading the package extensions. Because of that, the TensorKitChainRulesCoreExt module is not finding the TensorOperationsChainRulesCoreExt module, thus missing the required definitions. In principle this is not too hard to fix, it's a matter of porting over the definitions of _conj and trivtuple, but then we need to decide if it is worth it to backport this to a version 0.12.7, or if we wait for the new version of TensorKit. Any thoughts @Jutho ?

EDIT: It seems like this change affects the whole chain of packages, so things like PEPSKit no longer compile because of this. I'll open an issue to check if this is intended Julia behavior, but otherwise we should probably get this "hotfixed" and port it to a version 0.12.7

@Jutho
Copy link
Owner

Jutho commented Oct 17, 2024

I think this is due to this: JuliaLang/julia#55589

@Jutho
Copy link
Owner

Jutho commented Oct 17, 2024

I was also just looking into this. I do think porting over the required definitions is probably the quickest fix, as we will be starting to get many bug reports as people upgrade to Julia 1.11.1.

@lkdvos
Copy link
Collaborator

lkdvos commented Oct 17, 2024

Also see JuliaLang/julia#56204, we are not the only ones affected by this. I have to say that whether or not this gets resolved at the Julia level, it's safest to just avoid it altogether.

@Jutho
Copy link
Owner

Jutho commented Oct 17, 2024

Although; it may be harder than that. We also use this approach to overload internal methods from TensorOperationsChainRulesCoreExt, which will require a more substantial fix.

@lkdvos
Copy link
Collaborator

lkdvos commented Oct 17, 2024

Ah right, I forgot about that... We did not do this yet in the 0.12 version though, so it might be possible to hotfix that one and rethink the approach for the new tensorkit versions

@Yue-Zhengyuan
Copy link
Author

Now that TensorKitChainRulesCoreExt can build under Julia 1.11.1, should I close this issue, or leave it open to track further fundamental fixes?

@lkdvos
Copy link
Collaborator

lkdvos commented Nov 4, 2024

This should now be resolved both in the v0.12 series as well as the v0.13 series, so I am closing this now.

@lkdvos lkdvos closed this as completed Nov 4, 2024
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

No branches or pull requests

3 participants