Skip to content

Commit

Permalink
Merge pull request #1116 from sebas031811/sebas031811
Browse files Browse the repository at this point in the history
feat(build): #990 move cache directory
  • Loading branch information
dsalaza4 authored Jun 27, 2023
2 parents 3004ae7 + a8e78b9 commit 4340e83
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions docs/src/api/extensions/fundamentals.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/args/agnostic.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions src/cli/main/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -544,7 +544,7 @@ def _help_and_exit_with_src_no_tty(src: str, attrs: List[str]) -> None:


def _help_picking_attr(src: str, attrs: List[str]) -> List[str]:
cache = join(MAKES_DIR, "cache", "last.json")
cache = join(MAKES_DIR, "last.json")
initial_input = "/"
if exists(cache):
with open(cache, encoding="utf-8") as file:
Expand Down
2 changes: 1 addition & 1 deletion src/cli/test_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/evaluator/modules/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 4340e83

Please sign in to comment.