Giter Club home page Giter Club logo

testitemdetection.jl's Introduction

Julia

Build and Test Docs

This VS Code extension provides support for the Julia programming language.

Getting started

Installing Julia/VS Code/VS Code Julia extension

  1. Install Julia for your platform: https://julialang.org/downloads/
  2. Install VS Code for your platform: https://code.visualstudio.com/download At the end of this step you should be able to start VS Code.
  3. Choose Install in the VS Code Marketplace; or paste in browser's address bar to open this direct VS Code link vscode:extension/julialang.language-julia or manually install with:
    1. Start VS Code.
    2. Inside VS Code, go to the extensions view either by executing the View: Show Extensions command (click View->Command Palette...) or by clicking on the extension icon on the left side of the VS Code window.
    3. In the extensions view, simply search for the term julia in the marketplace search box, then select the extension named Julia and click the install button. You might have to restart VS Code after this step.

Configure the Julia extension

If you have installed Julia into a standard location on Mac or Windows, or if the Julia binary is on your PATH, the Julia VS Code extension should automatically find your Julia installation and you should not need to configure anything.

If the extension does not find your Julia installation automatically, or if you want to use a different Julia installation than the default one, you can set the julia.executablePath to point to the Julia executable that the extension should use. In that case the extension will always use that version of Julia. To edit your configuration settings, execute the Preferences: Open User Settings command (you can also access it via the menu File->Preferences->Settings), and then make sure your user settings include the julia.executablePath setting. The format of the string should follow your platform specific conventions, and be aware that the backlash \ is the escape character in JSON, so you need to use \\ as the path separator character on Windows.

Features

The extension currently provides:

Documentation

The documentation has sections that describe the features of this extension (including e.g. keyboard shortcuts). This repo also has legacy docs in the wiki.

Questions, Feature requests and contributions

  1. If you face any issues, please open an issue here.
  2. For some known issues and their solutions, please visit the known issues and workarounds.
  3. If there is already an issue opened related to yours, please leave an upvote/downvote on the issue.
  4. Contributions are always welcome! Please see our contributing guide for more details.

Data/Telemetry

The Julia extension for Visual Studio Code collects usage data and sends it to the development team to help improve the extension. Read our privacy policy to learn more and how to disable any telemetry.

testitemdetection.jl's People

Contributors

davidanthoff avatar nhdaly avatar nickrobinson251 avatar quinnj avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

testitemdetection.jl's Issues

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!

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!

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.