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

Do not crash on invalid UUID entries #1153

Merged
merged 1 commit into from
Sep 8, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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