Skip to content

Commit

Permalink
Assume 'make' is run
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisJefferson committed Sep 1, 2024
1 parent c37fb11 commit 087612a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 18 deletions.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ ifeq (, $(shell which cargo))
endif

all:
cd rust && cargo build --bins && cargo build --release --bins
cd rust && cargo build --release --bins

clean:
cd rust && cargo clean

doc:
../../gap -A -q -r --quitonbreak makedoc.g
Expand Down
19 changes: 7 additions & 12 deletions PackageInfo.g
Original file line number Diff line number Diff line change
Expand Up @@ -107,18 +107,13 @@ Dependencies := rec(
),

AvailabilityTest := function()
## This is currently commented out, because the package tries to compile
## the rust component when it first runs a computation.
##
## Note that the code below might not work properly if the user has multiple
## Voles living in their machine.

#if Filename(List(GAPInfo.PackagesInfo.vole, x -> Directory(Concatenation(
# x.InstallationPath, "/rust/target/release"))), "vole.d") = fail then
# LogPackageLoadingMessage(PACKAGE_WARNING,
# "Vole package is not compiled; please run `make` in the Vole directory");
# return fail;
#fi;
local dirs;
dirs := DirectoriesPackageLibrary("vole", "rust/target/release");
if not (Length(dirs) >= 1 and ForAny(["vole", "vole.exe"], f -> f in DirectoryContents(dirs[1])) ) then
LogPackageLoadingMessage(PACKAGE_WARNING,
"Vole package is not compiled; please run `make` in the Vole directory");
return fail;
fi;
return true;
end,

Expand Down
10 changes: 5 additions & 5 deletions gap/internal/comms.gi
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ function(savedvals, state, type, args)
is_left := (args[1] = "Left");
tracer := RecordingTracer();
PS_SplitCellsByFunction(state!.ps, tracer, x -> args[2][x]);

Assert(2, Length(state!.conlist) = 1);
filters := [];
if type = "begin" then
Expand Down Expand Up @@ -144,7 +144,7 @@ function(savedvals, state, type, args)

retval := filters;
return retval;
fi;
fi;
end;

# Choose how vole is run:
Expand All @@ -155,8 +155,8 @@ end;
# "flamegraph": Output a flamegraph of where CPU is used in "flamegraph.svg"
# "debug": Run inside the debugger

# if 'cargo' exists, we will automatically build vole
if Filename(DirectoriesSystemPrograms(), "cargo") <> fail then
# if 'cargo' exists, and vole executable is missing, we will automatically build vole
if Filename(DirectoriesSystemPrograms(), "cargo") <> fail and Length(DirectoriesPackageLibrary("vole", "rust/target/release")) = 0 then
VOLE_MODE := "opt-first";
else
VOLE_MODE := "opt-nobuild";
Expand Down Expand Up @@ -213,7 +213,7 @@ _Vole.ForkVole := function(extraargs...)
fi;

Append(args, extraargs);

Info(InfoVole, 2, "Preparing to fork vole");
if pipe then
rustpipe :=_Vole.IO_Pipe();
Expand Down

0 comments on commit 087612a

Please sign in to comment.