Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/PostDisciplinary.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ using JSON3

include("consensus/raft.jl")

@gitar-bot gitar-bot Bot Aug 9, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🚨 Bug: Load-order fix is incomplete; other submodules still fail

diffing.jl failed to load because it references ResearchProject/LinkedEntity in method signatures (evaluated at definition time) via using ..PostDisciplinary, while being included before those structs are defined at lines 80-96. But triangulation.jl (line 37), evolutionary.jl (38), hermeneutics.jl (40), and knowledge_transfer.jl (42) use the exact same pattern and are all still included before the type definitions. Since triangulation.jl now loads at the first include position that previously belonged to diffing.jl, package initialization will still throw UndefVarError: ResearchProject/LinkedEntity at triangulation.jl before diffing.jl is ever reached — the PR does not actually make the package load. Move the core type definitions (structs LinkedEntity, ResearchProject, and the ResearchProject(name) constructor) above the entire include(...) block so every submodule can resolve them, which also lets diffing.jl stay in place.

Hoist LinkedEntity/ResearchProject above all include() calls so all submodules load; keep full docstrings from the original definitions.:

# Define core public types BEFORE any include, so every submodule that
# references them in method signatures can resolve them at load time.
struct LinkedEntity
    id::UUID; source_library::Symbol; original_id::Symbol
    kind::Symbol; metadata::Dict{Symbol, Any}
end
struct ResearchProject
    id::Symbol; name::String; graph::MetaGraph
end
function ResearchProject(name::String)
    g = MetaGraph(SimpleGraph(); label_type=UUID, vertex_data_type=LinkedEntity,
                  edge_data_type=Dict{Symbol,Any}, graph_data=name)
    return ResearchProject(gensym("project"), name, g)
end
# ...then the include(...) block, including synthesis/diffing.jl

Was this helpful? React with 👍 / 👎

include("meta_analysis.jl")
include("synthesis/diffing.jl")
include("memetics.jl")
include("methodology.jl")
include("storage/verisim.jl")
Expand All @@ -45,7 +44,6 @@ include("synthesis/templates.jl")

using .RaftConsensus
using .MetaAnalysis
using .KnowledgeDiffing
using .Memetics
using .Methodology
using .VeriSimBridge
Expand Down Expand Up @@ -150,4 +148,9 @@ function generate_synthesis(p::ResearchProject)
)
end

# KnowledgeDiffing refers to the public ResearchProject and LinkedEntity types,
# so load it after those types have been defined.
include("synthesis/diffing.jl")
using .KnowledgeDiffing

end # module
Loading