From 701fbaf3f3415dae3342cf42a22a2b5b5f57ce4d Mon Sep 17 00:00:00 2001 From: Sebastian Cardona Date: Mon, 26 Jun 2023 18:42:18 -0500 Subject: [PATCH] feat(build): #990 move cache directory Signed-off-by: Sebastian Cardona --- docs/src/api/extensions/fundamentals.md | 4 ++-- src/args/agnostic.nix | 4 ++-- src/cli/main/cli.py | 6 +++--- src/cli/test_all.py | 2 +- src/evaluator/modules/default.nix | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/src/api/extensions/fundamentals.md b/docs/src/api/extensions/fundamentals.md index e96b3931..18b39672 100644 --- a/docs/src/api/extensions/fundamentals.md +++ b/docs/src/api/extensions/fundamentals.md @@ -584,8 +584,8 @@ Example: [DEBUG] Version is 1.0 [INFO] pwd is /data/github/fluidattacks/makes - [INFO] Running tree command on /home/user/.makes/state/example - /home/user/.makes/state/example + [INFO] Running tree command on /home/user/.cache/makes/state/example + /home/user/.cache/makes/state/example └── dir └── file diff --git a/src/args/agnostic.nix b/src/args/agnostic.nix index 129830ba..85dc20db 100644 --- a/src/args/agnostic.nix +++ b/src/args/agnostic.nix @@ -2,8 +2,8 @@ # and therefore are agnostic to the framework. { stateDirs ? { - global = "$HOME_IMPURE/.makes/state"; - project = "$HOME_IMPURE/.makes/state/__default__"; + global = "$HOME_IMPURE/.cache/makes/state"; + project = "$HOME_IMPURE/.cache/makes/state/__default__"; }, system ? builtins.currentSystem, }: let diff --git a/src/cli/main/cli.py b/src/cli/main/cli.py index 544d95f1..278f1cf5 100644 --- a/src/cli/main/cli.py +++ b/src/cli/main/cli.py @@ -74,9 +74,9 @@ highlight=False, file=io.TextIOWrapper(sys.stderr.buffer, write_through=True), ) -MAKES_DIR: str = join(environ["HOME_IMPURE"], ".makes") -makedirs(join(MAKES_DIR, "cache"), exist_ok=True) -SOURCES_CACHE: str = join(MAKES_DIR, "cache", "sources") +MAKES_DIR: str = join(environ["HOME_IMPURE"], ".cache/makes") +makedirs(MAKES_DIR, exist_ok=True) +SOURCES_CACHE: str = join(MAKES_DIR, "sources") ON_EXIT: List[Callable[[], None]] = [] VERSION: str = "23.06" diff --git a/src/cli/test_all.py b/src/cli/test_all.py index 27c83357..3f117fee 100644 --- a/src/cli/test_all.py +++ b/src/cli/test_all.py @@ -48,7 +48,7 @@ def test_dot_hello_world() -> None: def test_remote_hello_world() -> None: cache = ( os.environ["HOME_IMPURE"] - + "/.makes/cache/sources/github-fluidattacks-makes-main" + + "/.cache/makes/sources/github-fluidattacks-makes-main" ) shutil.rmtree(cache, ignore_errors=True) diff --git a/src/evaluator/modules/default.nix b/src/evaluator/modules/default.nix index 3f0abea1..4647a898 100644 --- a/src/evaluator/modules/default.nix +++ b/src/evaluator/modules/default.nix @@ -59,7 +59,7 @@ options = { globalStateDir = lib.mkOption { type = lib.types.str; - default = "$HOME_IMPURE/.makes/state"; + default = "$HOME_IMPURE/.cache/makes/state"; apply = lib.removeSuffix "/"; # canonicalize }; projectStateDir = lib.mkOption {