Giter Club home page Giter Club logo

testitemdetection.jl's Issues

TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.

If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.

If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!

TestItem not running in correct env -- Manifest ignored

In VSCode I see the test server crash with logs

  Activating new project at `/var/folders/gw/nbcmkyh14z5g975jz3tphx_m0000gn/T/jl_62bjCZ`
   Resolving package versions...
┌ Error: Some Julia code in the VS Code extension crashed
└ @ Main ~/.vscode/extensions/julialang.language-julia-1.38.2/scripts/error_handler.jl:15
ERROR: Unsatisfiable requirements detected for package ChunkedCSV [c0d0730e]:
 ChunkedCSV [c0d0730e] log:
 ├─ChunkedCSV [c0d0730e] has no known versions!
 └─restricted to versions * by RAICode [8f9924a8] — no versions left
   └─RAICode [8f9924a8] log:
     ├─possible versions are: 0.0.0 or uninstalled
     └─RAICode [8f9924a8] is fixed to version 0.0.0

which looks to me like we're trying to activate the repo Project.toml ignoring the Manifest.toml, but the Manifest.toml is crucial
(ChunkedCSV.jl is an open-source but unregistered package that we've added like ] add https://github.com/Drvi/ChunkedCSV.jl.git#main)

full log is

  Activating new project at `/var/folders/gw/nbcmkyh14z5g975jz3tphx_m0000gn/T/jl_62bjCZ`
   Resolving package versions...
┌ Error: Some Julia code in the VS Code extension crashed
└ @ Main ~/.vscode/extensions/julialang.language-julia-1.38.2/scripts/error_handler.jl:15
ERROR: Unsatisfiable requirements detected for package ChunkedCSV [c0d0730e]:
 ChunkedCSV [c0d0730e] log:
 ├─ChunkedCSV [c0d0730e] has no known versions!
 └─restricted to versions * by RAICode [8f9924a8] — no versions left
   └─RAICode [8f9924a8] log:
     ├─possible versions are: 0.0.0 or uninstalled
     └─RAICode [8f9924a8] is fixed to version 0.0.0
Stacktrace:
  [1] check_constraints(graph::Pkg.Resolve.Graph)
    @ Pkg.Resolve /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Pkg/src/Resolve/graphtype.jl:998
  [2] Pkg.Resolve.Graph(compat::Dict{Base.UUID, Dict{VersionNumber, Dict{Base.UUID, Pkg.Versions.VersionSpec}}}, uuid_to_name::Dict{Base.UUID, String}, reqs::Dict{Base.UUID, Pkg.Versions.VersionSpec}, fixed::Dict{Base.UUID, Pkg.Resolve.Fixed}, verbose::Bool, julia_version::VersionNumber)
    @ Pkg.Resolve /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Pkg/src/Resolve/graphtype.jl:344
  [3] deps_graph(env::Pkg.Types.EnvCache, registries::Vector{Pkg.Registry.RegistryInstance}, uuid_to_name::Dict{Base.UUID, String}, reqs::Dict{Base.UUID, Pkg.Versions.VersionSpec}, fixed::Dict{Base.UUID, Pkg.Resolve.Fixed}, julia_version::VersionNumber)
    @ Pkg.Operations /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Pkg/src/Operations.jl:496
  [4] resolve_versions!(env::Pkg.Types.EnvCache, registries::Vector{Pkg.Registry.RegistryInstance}, pkgs::Vector{Pkg.Types.PackageSpec}, julia_version::VersionNumber)
    @ Pkg.Operations /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Pkg/src/Operations.jl:351
  [5] targeted_resolve(env::Pkg.Types.EnvCache, registries::Vector{Pkg.Registry.RegistryInstance}, pkgs::Vector{Pkg.Types.PackageSpec}, preserve::Pkg.Types.PreserveLevel, julia_version::VersionNumber)
    @ Pkg.Operations /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Pkg/src/Operations.jl:1254
  [6] tiered_resolve(env::Pkg.Types.EnvCache, registries::Vector{Pkg.Registry.RegistryInstance}, pkgs::Vector{Pkg.Types.PackageSpec}, julia_version::VersionNumber)
    @ Pkg.Operations /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Pkg/src/Operations.jl:1239
  [7] _resolve(io::Base.PipeEndpoint, env::Pkg.Types.EnvCache, registries::Vector{Pkg.Registry.RegistryInstance}, pkgs::Vector{Pkg.Types.PackageSpec}, preserve::Pkg.Types.PreserveLevel, julia_version::VersionNumber)
    @ Pkg.Operations /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Pkg/src/Operations.jl:1260
  [8] develop(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}, new_git::Set{Base.UUID}; preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform)
    @ Pkg.Operations /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Pkg/src/Operations.jl:1298
  [9] develop(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; shared::Bool, preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform, kwargs::Base.Pairs{Symbol, Base.PipeEndpoint, Tuple{Symbol}, NamedTuple{(:io,), Tuple{Base.PipeEndpoint}}})
    @ Pkg.API /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Pkg/src/API.jl:222
 [10] develop(pkgs::Vector{Pkg.Types.PackageSpec}; io::Base.PipeEndpoint, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Pkg.API /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Pkg/src/API.jl:156
 [11] develop(pkgs::Vector{Pkg.Types.PackageSpec})
    @ Pkg.API /Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Pkg/src/API.jl:145
 [12] develop(; name::Nothing, uuid::Nothing, version::Nothing, url::Nothing, rev::Nothing, path::String, mode::Pkg.Types.PackageMode, subdir::Nothing, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Pkg.API ./boot.jl:0
 [13] serve(conn::Base.PipeEndpoint, project_path::String, package_path::String, package_name::String; is_dev::Bool, crashreporting_pipename::Nothing)
    @ VSCodeTestServer ~/.vscode/extensions/julialang.language-julia-1.38.2/scripts/packages/VSCodeTestServer/src/VSCodeTestServer.jl:194
 [14] serve(conn::Base.PipeEndpoint, project_path::String, package_path::String, package_name::String)
    @ VSCodeTestServer ~/.vscode/extensions/julialang.language-julia-1.38.2/scripts/packages/VSCodeTestServer/src/VSCodeTestServer.jl:190
 [15] top-level scope
    @ ~/.vscode/extensions/julialang.language-julia-1.38.2/scripts/testserver/testserver_main.jl:14
 [16] include(mod::Module, _path::String)
    @ Base ./Base.jl:419
 [17] exec_options(opts::Base.JLOptions)
    @ Base ./client.jl:303
 [18] _start()
    @ Base ./client.jl:522

TestRunner.jl works fine -- i guess because Pkg is doing to env set-up in that case and correctly uses the Manifest.toml

@davidanthoff says, this is a bug: The theory is that if there is a Project/Manifest combo in a parent folder of the file with the @testitem, (but still a child of the folder that we are testing), and the package in which the test is defined is deved into that project, then that env should become the base env for the test environment.  Code for that is https://github.com/julia-vscode/TestItemDetection.jl/blob/main/src/packagedef.jl#L206-L227 Essentially there should be values for all three things: project_uri, package_uri and package_name

it looks like we're not finding the Project.toml for some reason

julia> TestItemRunner2.run_tests(abspath("../InlineStrings.jl/"); verbose=true)
┌ Info: Launching new process...
│   testitem.name = "InlineString basics"
│   testitem.filename = "/Users/nickr/repos/InlineStrings.jl/test/runtests.jl"
└   key = (project_path = "", package_path = "/Users/nickr/repos/InlineStrings.jl", package_name = "InlineStrings")

i.e. project_uri = find_project_for_file(jw, uri) is returning nothing:

function find_project_for_file(jw::JuliaWorkspace, file::URI)
file_path = uri2filepath(file)
project = jw._projects |>
keys |>
collect |>
x -> map(x) do i
project_folder_path = uri2filepath(i)
parts = splitpath(project_folder_path)
return (uri = i, parts = parts)
end |>
x -> filter(x) do i
return vec_startswith(splitpath(file_path), i.parts)
end |>
x -> sort(x, by=i->length(i.parts), rev=true) |>
x -> length(x) == 0 ? nothing : first(x).uri
return project
end

Missing 0.2.0 tag

The latest version of this project is 0.2.0, but there is no Git tag and no release for that version number. Could you add these to this project, please? Thanks a lot!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.