From cf9f2c9a03f3fc9402338bbadfb459eb0e491ec8 Mon Sep 17 00:00:00 2001 From: alecloudenback Date: Mon, 26 Jun 2023 21:50:30 -0500 Subject: [PATCH 1/2] Clarify error with project missing attributes I ran into this issue today and was confused because my project had a name but no UUID. ref #3074 --- src/API.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/API.jl b/src/API.jl index 6fa2bd7d6f..c07f664f0d 100644 --- a/src/API.jl +++ b/src/API.jl @@ -430,7 +430,7 @@ function test(ctx::Context, pkgs::Vector{PackageSpec}; Context!(ctx; kwargs...) if isempty(pkgs) - ctx.env.pkg === nothing && pkgerror("trying to test unnamed project") #TODO Allow this? + ctx.env.pkg === nothing && pkgerror("Project.toml must have project name and UUID") #TODO Allow this? push!(pkgs, ctx.env.pkg) else project_resolve!(ctx.env, pkgs) From dcd8850d8658e29861df6e3c35040fa81e9fe2dd Mon Sep 17 00:00:00 2001 From: Ian Butterworth Date: Sat, 8 Jul 2023 18:48:52 -0400 Subject: [PATCH 2/2] Update src/API.jl --- src/API.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/API.jl b/src/API.jl index c07f664f0d..7478852220 100644 --- a/src/API.jl +++ b/src/API.jl @@ -430,7 +430,7 @@ function test(ctx::Context, pkgs::Vector{PackageSpec}; Context!(ctx; kwargs...) if isempty(pkgs) - ctx.env.pkg === nothing && pkgerror("Project.toml must have project name and UUID") #TODO Allow this? + ctx.env.pkg === nothing && pkgerror("The Project.toml of the package being tested must have a name and a UUID entry") #TODO Allow this? push!(pkgs, ctx.env.pkg) else project_resolve!(ctx.env, pkgs)