Skip to content

Precompile Error: WARNING: eval into closed module Routing: #101

@ueliwechsler

Description

@ueliwechsler

After successfully creating a Julia webserver (similar to the rest example with the post routes) with this great package, I tried to precompile my code within a module.

But the precompilation failed with this error message:

WARNING: eval into closed module Routing:
Expr(:call, :route, Expr(:::, Expr(:curly, :Val, Expr(:call, :Symbol, "POST"))), Expr(:::, Expr(:curly, :Val, Expr(:call, :Symbol, Base.SubString{String}(string="dyson/loadportfolio", offset=0, ncodeunits=5)))), Expr(:::, Expr(:curly, :Val, Expr(:call, :Symbol, Base.SubString{String}(string="dyson/loadportfolio", offset=6, ncodeunits=13))))) = Expr(:block, #= Symbol("C:\Users\UELIWECH\.julia\packages\Bukdu\YIeiP\src\Routing.jl"):58 =#, Expr(:call, :Route, DJSON.MicroServices.MicroServiceController, typeof(DJSON.MicroServices.load_portfolio_service)(), Base.Dict{Symbol, DataType}(slots=Array{UInt8, (16,)}[0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00], keys=Array{Symbol, (16,)}[#<null>, #<null>, #<null>, #<null>, #<null>, #<null>, #<null>, #<null>, #<null>, #<null>, #<null>, #<null>, #<null>, #<null>, #<null>, #<null>], vals=Array{DataType, (16,)}[#<null>, #<null>, #<null>, #<null>, #<null>, #<null>, #<null>, #<null>, #<null>, #<null>, #<null>, #<null>, #<null>, #<null>, #<null>, #<null>], ndel=0, count=0, age=0x0000000000000000, idxfloor=1, maxprobe=0), Expr(:call, Expr(:curly, :Vector, Expr(:curly, :Pair, :String, :Any))), Array{Any, (0,)}[]))
  ** incremental compilation may be fatally broken for this module **

I assume that it has to do with the scope of @eval. Possibly here:

@eval route(::Val{Symbol($method)}, $(vals...)) = Route($C, $action, $param_types, Vector{Pair{String,Any}}($(path_params...)), $pipelines)

I will have a closer look over the weekend. But if you already have any idea how to fix this, help would be much appreciated. I can also provide my source code if this error cannot be reproduced.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions