From e543ab72c7bfe72c818d37f57f2e59d939746b9f Mon Sep 17 00:00:00 2001 From: Stefan Karpinski Date: Fri, 8 Jun 2018 08:43:42 -0400 Subject: [PATCH] consistent abbreviation of "compat" (#142) --- docs/src/index.md | 2 +- src/Operations.jl | 2 +- src/Types.jl | 16 ++++++++-------- test/repl.jl | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/src/index.md b/docs/src/index.md index 651a725621..404133f644 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -416,7 +416,7 @@ If the compatibility for a dependency is not given, the project is assumed to be Compatibility for a dependency is entered in the `Project.toml` file as for example: ```toml -[compatibility] +[compat] Example = "0.4.3" ``` diff --git a/src/Operations.jl b/src/Operations.jl index 70db30c3ff..0f72ec35aa 100644 --- a/src/Operations.jl +++ b/src/Operations.jl @@ -132,7 +132,7 @@ function collect_project!(ctx::Context, pkg::PackageSpec, path::String, fix_deps fix_deps_map[pkg.uuid] = valtype(fix_deps_map)() !isfile(project_file) && return false project = read_project(project_file) - compat = get(project, "compatibility", Dict()) + compat = get(project, "compat", Dict()) for (deppkg_name, uuid) in project["deps"] vspec = haskey(compat, deppkg_name) ? Types.semver_spec(compat[deppkg_name]) : VersionSpec() deppkg = PackageSpec(deppkg_name, UUID(uuid), vspec) diff --git a/src/Types.jl b/src/Types.jl index 934bf0e0ae..8885be50f5 100644 --- a/src/Types.jl +++ b/src/Types.jl @@ -344,7 +344,7 @@ end function project_compatibility(ctx::Context, name::String) v = VersionSpec() project = ctx.env.project - compat = get(project, "compatibility", Dict()) + compat = get(project, "compat", Dict()) if haskey(compat, name) v = VersionSpec(semver_spec(compat[name])) end @@ -1021,13 +1021,13 @@ function pathrepr(ctx::Union{Nothing, Context}, path::String, base::String=pwd() end function project_key_order(key::String) - key == "name" && return 1 - key == "uuid" && return 2 - key == "keywords" && return 3 - key == "license" && return 4 - key == "desc" && return 5 - key == "deps" && return 6 - key == "compatibility" && return 7 + key == "name" && return 1 + key == "uuid" && return 2 + key == "keywords" && return 3 + key == "license" && return 4 + key == "desc" && return 5 + key == "deps" && return 6 + key == "compat" && return 7 return 8 end diff --git a/test/repl.jl b/test/repl.jl index 1cd4476d4c..06f62d0e70 100644 --- a/test/repl.jl +++ b/test/repl.jl @@ -283,7 +283,7 @@ temp_pkg_dir() do project_path; cd(project_path) do open("Project.toml"; append=true) do io print(io, """ - [compatibility] + [compat] JSON = "0.16.0" """ )