Skip to content

Commit

Permalink
Merge pull request #1153 from julia-vscode/fix-test-detection-crash
Browse files Browse the repository at this point in the history
Do not crash on invalid UUID entries
  • Loading branch information
davidanthoff authored Sep 8, 2022
2 parents a791811 + dea8957 commit a591a78
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/juliaworkspace.jl
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,11 @@ function semantic_pass_toml_files(toml_syntax_trees)
for (k,v) in pairs(toml_syntax_trees)
# TODO Maybe also check the filename here and only do the package detection for Project.toml and JuliaProject.toml
if haskey(v, "name") && haskey(v, "uuid") && haskey(v, "version")
folder_uri = k |> uri2filepath |> dirname |> filepath2uri
packages[folder_uri] = JuliaPackage(k, v["name"], UUID(v["uuid"]))
parsed_uuid = tryparse(UUID, v["uuid"])
if parsed_uuid!==nothing
folder_uri = k |> uri2filepath |> dirname |> filepath2uri
packages[folder_uri] = JuliaPackage(k, v["name"], parsed_uuid)
end
end

path = uri2filepath(k)
Expand Down

0 comments on commit a591a78

Please sign in to comment.