Skip to content

Commit

Permalink
Change all mentions of 'catalog' to 'index'
Browse files Browse the repository at this point in the history
  • Loading branch information
mosteo committed Jul 18, 2023
1 parent 5c17abb commit bad42f9
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 19 deletions.
4 changes: 2 additions & 2 deletions src/alire/alire-solver.adb
Original file line number Diff line number Diff line change
Expand Up @@ -1040,11 +1040,11 @@ package body Alire.Solver is

else

-- The crate plainly doesn't exist in our loaded catalog, so
-- The crate plainly doesn't exist in our loaded index, so
-- mark it as missing an move on:

Trace.Debug
("SOLVER: catalog LACKS the crate " & Raw_Dep.Image
("SOLVER: index LACKS the crate " & Raw_Dep.Image
& " when the search tree was "
& Image_One_Line (State));

Expand Down
4 changes: 2 additions & 2 deletions src/alire/alire-solver.ads
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ package Alire.Solver is

---------------------
-- Basic queries --
-- Merely check the catalog
-- Merely check the index

function Exists (Name : Alire.Crate_Name;
Version : Semantic_Versioning.Version;
Expand Down Expand Up @@ -123,7 +123,7 @@ package Alire.Solver is

-----------------------
-- Advanced queries --
-- They may need to travel the full catalog, with multiple individual
-- They may need to travel the full index, with multiple individual
-- availability checks.

type Query_Options is record
Expand Down
21 changes: 11 additions & 10 deletions src/alire/alire-toml_index.adb
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,16 @@ package body Alire.TOML_Index is
Root : Any_Path;
Result : out Load_Result)
with Pre => Result.Success;
-- Check that Catalog_Dir contains a file called "index.toml" and that it
-- describes a supported catalog.
-- Check that the index contains a file called "index.toml" and that it
-- describes a supported index, and that the file tree follows the proper
-- naming conventions, without extraneous files being present.

procedure Load_Manifest (Item : Ada.Directories.Directory_Entry_Type;
Stop : in out Boolean);
-- Check if entry is a candidate to manifest file, and in that case load
-- its contents. May raise Checked_Error.

procedure Load_From_Catalog_Internal
procedure Load_From_Index_Internal
(File_Name : Absolute_Path;
Name : Crate_Name;
Version : String;
Expand Down Expand Up @@ -289,7 +290,7 @@ package body Alire.TOML_Index is

TOML_Index.Strict := Load.Strict;

Trace.Detail ("Loading full catalog from " & Root);
Trace.Detail ("Loading full index from " & Root);

Check_Index (Index, Root, Result);

Expand Down Expand Up @@ -418,19 +419,19 @@ package body Alire.TOML_Index is
& Path);
end if;

Load_From_Catalog_Internal (File_Name => Path,
Load_From_Index_Internal (File_Name => Path,
Name => FS_Name,
Version => FS_Version,
Strict => Strict);
end;
end;
end Load_Manifest;

--------------------------------
-- Load_From_Catalog_Internal --
--------------------------------
------------------------------
-- Load_From_Index_Internal --
------------------------------

procedure Load_From_Catalog_Internal
procedure Load_From_Index_Internal
(File_Name : Absolute_Path;
Name : Crate_Name;
Version : String;
Expand Down Expand Up @@ -511,7 +512,7 @@ package body Alire.TOML_Index is
Manifest.Index,
Strict));
end if;
end Load_From_Catalog_Internal;
end Load_From_Index_Internal;

-------------------
-- Index_Release --
Expand Down
2 changes: 1 addition & 1 deletion src/alire/alire-toolchains.adb
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ package body Alire.Toolchains is
Pick_Up_Tool (Crate, Fill_Version_Choices (Crate));
else
Put_Warning
("No indexed versions in the catalog for crate "
("No indexed versions found for crate "
& Crate.TTY_Image);
end if;

Expand Down
2 changes: 1 addition & 1 deletion src/alire/alire-toolchains.ads
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ package Alire.Toolchains is
& "dependencies on particular compiler crates, for example to "
& "use a cross-compiler. In this situation, a compiler already "
& "available (selected as default or already installed) will "
& "take precedence over a compiler available in the catalog. ")
& "take precedence over a compiler available in the index. ")
.Append ("")
.Append ("See also "
& TTY.URL ("https://alire.ada.dev/docs/#toolchains") & " for "
Expand Down
4 changes: 2 additions & 2 deletions src/alr/alr-commands-get.adb
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ package body Alr.Commands.Get is

if not Alire.Index.Exists (Allowed.Crate) then
Reportaise_Command_Failed
("Crate [" & Args (1) & "] does not exist in the catalog.");
("Crate [" & Args (1) & "] does not exist in the index.");
end if;

Check_Unavailable_External (Allowed.Crate);
Expand All @@ -355,7 +355,7 @@ package body Alr.Commands.Get is
if not Query.Exists (Allowed.Crate, Allowed.Versions) then
Reportaise_Command_Failed
("Release within the requested versions ["
& Allowed.TTY_Image & "] does not exist in the catalog.");
& Allowed.TTY_Image & "] does not exist in the index.");
end if;

Retrieve (Cmd, Allowed.Crate, Allowed.Versions);
Expand Down
2 changes: 1 addition & 1 deletion testsuite/tests/get/get-not-found/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

p = run_alr('get', 'does_not_exist', complain_on_error=False)
assert_eq(1, p.status)
assert_match('.*Crate \[does_not_exist\] does not exist in the catalog\.\n',
assert_match('.*Crate \[does_not_exist\] does not exist in the index\.\n',
p.out)
assert_eq([], glob('does_not_exist*'))

Expand Down

0 comments on commit bad42f9

Please sign in to comment.