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

Possible bug #56

Open
rambunctiousapple opened this issue Apr 30, 2022 · 0 comments
Open

Possible bug #56

rambunctiousapple opened this issue Apr 30, 2022 · 0 comments

Comments

@rambunctiousapple
Copy link

deploy creates a directory with the version number, something like 0.1.0, and puts the html there. If you run deploy twice without changing the version number it will print a warning:

 Warning: './0.1.0' already exists. Use force to overwrite it.

and then deploy will create another directory 0.1.0 inside the already existing 0.1.0 directory.

The result looks like this:

0.1.0
    0.1.0
      docs
      ... other stuff
    docs
   ... other stuff

The doc says that deploy(...;force=true) will overwrite the existing 0.1.0 directory but when I've tried this it does not overwrite the existing directory. It still writes the new 0.1.0 subdirectory inside the existing one and then crashes with this error:

julia> deploy(PublishTest, force=true)
ERROR: SystemError: opening file "C:\\Users\\seatt\\OneDrive\\Documents\\github\\PublishTest.jl\\0.1.0\\12148594606675175651.png": No such file or directory
Stacktrace:
  [1] systemerror(p::String, errno::Int32; extrainfo::Nothing)
    @ Base .\error.jl:174
  [2] #systemerror#68
    @ .\error.jl:173 [inlined]
  [3] systemerror
    @ .\error.jl:173 [inlined]
  [4] open(fname::String; lock::Bool, read::Nothing, write::Nothing, create::Nothing, truncate::Nothing, append::Nothing)      
    @ Base .\iostream.jl:293
  [5] open
    @ .\iostream.jl:282 [inlined]
  [6] open(f::Base.var"#362#363"{Tuple{}}, args::String; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Base .\io.jl:328
  [7] open
    @ .\io.jl:328 [inlined]
  [8] read
    @ .\io.jl:434 [inlined]
  [9] read
    @ C:\Users\seatt\.julia\packages\FilePathsBase\dVWLK\src\system.jl:379 [inlined]
 [10] loadfile(#unused#::Publish.Extension{:png}, env::Dict{String, Any}, path::FilePathsBase.WindowsPath)
    @ Publish C:\Users\seatt\.julia\packages\Publish\7qwwh\src\load.jl:151
 [11] loadfile(env::Dict{String, Any}, path::FilePathsBase.WindowsPath)
    @ Publish C:\Users\seatt\.julia\packages\Publish\7qwwh\src\load.jl:78
 [12] (::Publish.var"#21#23"{Dict{String, Any}, FileTrees.FileTree})(file::FileTrees.File)
    @ Publish C:\Users\seatt\.julia\packages\Publish\7qwwh\src\load.jl:62
 [13] (::Dagger.var"#79#80"{Publish.var"#21#23"{Dict{String, Any}, FileTrees.FileTree}, Tuple{FileTrees.File}, NamedTuple{(:sch_uid, :sch_handle, :processor, :utilization), Tuple{UInt64, Dagger.Sch.SchedulerHandle, Dagger.ThreadProc, UInt64}}})()
    @ Dagger C:\Users\seatt\.julia\packages\Dagger\vIAAO\src\processor.jl:169
Stacktrace:
  [1] wait
    @ .\task.jl:334 [inlined]
  [2] fetch
    @ .\task.jl:349 [inlined]
  [3] execute!(proc::Dagger.ThreadProc, f::Any, args::Any)
    @ Dagger C:\Users\seatt\.julia\packages\Dagger\vIAAO\src\processor.jl:178
  [4] #126
    @ C:\Users\seatt\.julia\packages\Dagger\vIAAO\src\sch\Sch.jl:1054 [inlined]
  [5] (::Dagger.var"#62#63"{Dagger.Sch.var"#126#135"{Dagger.ThreadProc, Vector{Any}}})()
    @ Dagger C:\Users\seatt\.julia\packages\Dagger\vIAAO\src\options.jl:7
  [6] with_logstate(f::Function, logstate::Any)
    @ Base.CoreLogging .\logging.jl:511
  [7] with_logger(f::Function, logger::ContextVariablesX.ContextPayloadLogger)
    @ Base.CoreLogging .\logging.jl:623
  [8] with_task_ctxvars(f::Any, ctx::Any)
    @ ContextVariablesX C:\Users\seatt\.julia\packages\ContextVariablesX\wzJaf\src\payloadlogger.jl:16
  [9] with_context(f::Function, kvs::Pair{ContextVariablesX.ContextVar{NamedTuple}, NamedTuple{(), Tuple{}}})
    @ ContextVariablesX C:\Users\seatt\.julia\packages\ContextVariablesX\wzJaf\src\ContextVariablesX.jl:336
 [10] with_options(f::Dagger.Sch.var"#126#135"{Dagger.ThreadProc, Vector{Any}}, options::NamedTuple{(), Tuple{}})
    @ Dagger C:\Users\seatt\.julia\packages\Dagger\vIAAO\src\options.jl:6
 [11] do_task(to_proc::Dagger.ThreadProc, comm::Vector{Any})
    @ Dagger.Sch C:\Users\seatt\.julia\packages\Dagger\vIAAO\src\sch\Sch.jl:1052
 [12] macro expansion
    @ C:\Users\seatt\.julia\packages\Dagger\vIAAO\src\sch\Sch.jl:938 [inlined]
 [13] (::Dagger.Sch.var"#116#118"{Dagger.ThreadProc, Distributed.RemoteChannel{Channel{Any}}, Vector{Any}})()
    @ Dagger.Sch .\task.jl:423
Stacktrace:
  [1] (::Dagger.Sch.var"#84#85"{Dagger.Context, Dagger.Sch.ComputeState, Dagger.OSProc, NamedTuple{(:pressure, :loadavg, :threadtime, :transfer_rate), Tuple{UInt64, Tuple{Float64, Float64, Float64}, UInt64, Nothing}}, Distributed.RemoteException, Int64, Dagger.ThreadProc, Int64})()
    @ Dagger.Sch C:\Users\seatt\.julia\packages\Dagger\vIAAO\src\sch\Sch.jl:457
  [2] lock(f::Dagger.Sch.var"#84#85"{Dagger.Context, Dagger.Sch.ComputeState, Dagger.OSProc, NamedTuple{(:pressure, :loadavg, :threadtime, :transfer_rate), Tuple{UInt64, Tuple{Float64, Float64, Float64}, UInt64, Nothing}}, Distributed.RemoteException, Int64, Dagger.ThreadProc, Int64}, l::ReentrantLock)
    @ Base .\lock.jl:190
  [3] scheduler_run(ctx::Dagger.Context, state::Dagger.Sch.ComputeState, d::Dagger.Thunk, options::Dagger.Sch.SchedulerOptions)
    @ Dagger.Sch C:\Users\seatt\.julia\packages\Dagger\vIAAO\src\sch\Sch.jl:438
  [4] compute_dag(ctx::Dagger.Context, d::Dagger.Thunk; options::Nothing)
    @ Dagger.Sch C:\Users\seatt\.julia\packages\Dagger\vIAAO\src\sch\Sch.jl:366
  [5] compute(ctx::Dagger.Context, d::Dagger.Thunk; options::Nothing)
    @ Dagger C:\Users\seatt\.julia\packages\Dagger\vIAAO\src\compute.jl:31
  [6] compute
    @ C:\Users\seatt\.julia\packages\Dagger\vIAAO\src\compute.jl:28 [inlined]
  [7] exec(ctx::Dagger.Context, d::Dagger.Thunk)
    @ FileTrees C:\Users\seatt\.julia\packages\FileTrees\tvmr7\src\parallelism.jl:75
  [8] exec(x::Dagger.Thunk)
    @ FileTrees C:\Users\seatt\.julia\packages\FileTrees\tvmr7\src\parallelism.jl:64
  [9] _html(p::Publish.Project, t::FileTrees.FileTree, f::FileTrees.File, m::Dict{FilePathsBase.WindowsPath, NamedTuple{(:prev, :next), Tuple{FilePathsBase.WindowsPath, FilePathsBase.WindowsPath}}})
    @ Publish C:\Users\seatt\.julia\packages\Publish\7qwwh\src\save.jl:48
 [10] (::Publish.var"#74#76"{Dict{FilePathsBase.WindowsPath, NamedTuple{(:prev, :next), Tuple{FilePathsBase.WindowsPath, FilePathsBase.WindowsPath}}}, Publish.Project})(f::FileTrees.File)
    @ Publish C:\Users\seatt\.julia\packages\Publish\7qwwh\src\save.jl:38
 [11] save(f::Publish.var"#74#76"{Dict{FilePathsBase.WindowsPath, NamedTuple{(:prev, :next), Tuple{FilePathsBase.WindowsPath, FilePathsBase.WindowsPath}}}, Publish.Project}, tree::FileTrees.FileTree)
    @ Publish C:\Users\seatt\.julia\packages\Publish\7qwwh\src\save.jl:16
 [12] (::Publish.var"#73#75"{Publish.Project})()
    @ Publish C:\Users\seatt\.julia\packages\Publish\7qwwh\src\save.jl:38
 [13] cd(f::Publish.var"#73#75"{Publish.Project}, dir::String)
    @ Base.Filesystem .\file.jl:99
 [14] sandbox
    @ C:\Users\seatt\.julia\packages\Publish\7qwwh\src\utilities.jl:12 [inlined]
 [15] html(src::Publish.Project, dst::String; keywords::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Publish C:\Users\seatt\.julia\packages\Publish\7qwwh\src\save.jl:31
 [16] html(src::Publish.Project, dst::String)
    @ Publish C:\Users\seatt\.julia\packages\Publish\7qwwh\src\save.jl:27
 [17] deploy(source::Module, dir::String, targets::typeof(html); versioned::Bool, named::Bool, force::Bool, label::String, root::String, kws::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Publish C:\Users\seatt\.julia\packages\Publish\7qwwh\src\deploy.jl:91
 [18] top-level scope
    @ REPL[14]:1

If the top 0.1.0 directory is removed then deploy works again.

This overall behavior was confusing to me and is one of the things that has caused github deployment not to work. @MichaelHatherly perhaps I'm not understanding the logic of how deploy is supposed to be used and under what circumstances someone would want the default to be this nesting directory behavior. Is this a bug or is it intentional and I'm just not getting it? If it is intentional maybe more explanation in the docs would be helpful? If you explain it to me I'll write the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant