galaaz 2.1.1 → 2.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +24 -0
- data/ext/new_bridge/Makefile +10 -10
- data/ext/new_bridge/galaaz_gatekeeper_phase1.cpp +13 -3
- data/lib/galaaz/cli.rb +28 -7
- data/version.rb +1 -1
- metadata +5 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: '085fd47fe76016fb5b078f3c44a02100a7d9af05c2f7cf9e19ded83058947c8e'
|
|
4
|
+
data.tar.gz: 19f36b20968fd4456ad95024f2a33dbde60dfdf62a3bbda295d49e08a8c32bc7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c7db477fca2f6de435d9eb6bd5ccc5ee709a779e3a5816febc9a0eda9be51f5f18812af79889e7fd4ce1e5facd79a080e80a98829381b19670d6a380765554c4
|
|
7
|
+
data.tar.gz: 6ba4144e49328b6bb70188ab6330ed086f969cb952076758db0207171c54c2ff41e6fb21c8666a6cd87b459f47b2786a31edf8f1f1b98343d7d536aae902de36
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.1.3
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- Gatekeeper builds on **R 4.5+/4.6** (Omarchy): replace removed `Rf_findVar` with
|
|
8
|
+
`R_getVarEx` (fallback to `Rf_findVar` on older R).
|
|
9
|
+
|
|
10
|
+
## 2.1.2
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- CRAN installs (`galaaz setup` / `galaaz add`) use a writable user library
|
|
15
|
+
(`R_LIBS_USER`, default `~/.local/lib/R/library`) so Omarchy/Arch no longer fail
|
|
16
|
+
with `lib = "/usr/lib/R/library" is not writable`.
|
|
17
|
+
- Gatekeeper `ext/new_bridge` Makefile uses `R CMD config --ldflags` instead of
|
|
18
|
+
hardcoded `-L$(R_HOME)/lib -lR` (breaks when `RHOME` is `/usr/lib64/R`).
|
|
19
|
+
- `galaaz setup` marks profile `core` on success.
|
|
20
|
+
|
|
21
|
+
### Notes
|
|
22
|
+
|
|
23
|
+
- Omarchy dogfood: `script/omarchy/install-galaaz.sh` installs latest from RubyGems
|
|
24
|
+
(optional pin: `GALAAZ_GEM_VERSION=x.y.z`). Re-copy into `~/.local/bin/omarchy-install-galaaz`
|
|
25
|
+
after updating the script.
|
|
26
|
+
|
|
3
27
|
## 2.1.1
|
|
4
28
|
|
|
5
29
|
### Added
|
data/ext/new_bridge/Makefile
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
# Makefile for Galaaz Gatekeeper shared library
|
|
2
2
|
# Usage: make clean all
|
|
3
3
|
|
|
4
|
-
# R
|
|
4
|
+
# Prefer `R` / `Rscript` on PATH (Omarchy/Arch: RHOME may be /usr/lib64/R).
|
|
5
5
|
R_HOME := $(shell R RHOME)
|
|
6
|
-
R_CPPFLAGS := $(shell
|
|
7
|
-
|
|
6
|
+
R_CPPFLAGS := $(shell R CMD config --cppflags)
|
|
7
|
+
# Full linker flags from R (do NOT hardcode -L$(R_HOME)/lib — wrong on some Arch layouts).
|
|
8
|
+
R_LDFLAGS := $(shell R CMD config --ldflags)
|
|
8
9
|
|
|
9
|
-
# Rcpp configuration
|
|
10
|
-
RCPP_INCLUDE := $(shell
|
|
10
|
+
# Rcpp configuration (needs R_LIBS_USER for user-library installs)
|
|
11
|
+
RCPP_INCLUDE := $(shell Rscript -e "cat(system.file('include', package='Rcpp'))")
|
|
11
12
|
RCPP_CPPFLAGS := -I$(RCPP_INCLUDE)
|
|
12
13
|
|
|
13
14
|
# Compiler settings
|
|
14
|
-
CXX := $(shell
|
|
15
|
-
CXXFLAGS := $(shell
|
|
15
|
+
CXX := $(shell R CMD config CXX)
|
|
16
|
+
CXXFLAGS := $(shell R CMD config CXXFLAGS)
|
|
16
17
|
CPPFLAGS := $(R_CPPFLAGS) $(RCPP_CPPFLAGS) -I.
|
|
17
|
-
|
|
18
|
-
LDFLAGS := -L$(R_HOME)/lib -lR -Wl,-rpath,$(R_HOME)/lib
|
|
18
|
+
LDFLAGS := $(R_LDFLAGS) -Wl,-rpath,$(R_HOME)/lib
|
|
19
19
|
|
|
20
20
|
# Target library
|
|
21
21
|
TARGET := galaaz_gatekeeper.so
|
|
@@ -34,7 +34,7 @@ $(TARGET): $(OBJ)
|
|
|
34
34
|
|
|
35
35
|
check: $(TARGET)
|
|
36
36
|
@echo "Checking library..."
|
|
37
|
-
|
|
37
|
+
@Rscript -e "dyn.load('$(TARGET)'); cat('Library loads successfully\n')"
|
|
38
38
|
|
|
39
39
|
clean:
|
|
40
40
|
rm -f $(OBJ) $(TARGET)
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
// -----------------------------------------------------------------------------
|
|
46
46
|
|
|
47
47
|
#include <Rcpp.h>
|
|
48
|
+
#include <Rversion.h>
|
|
48
49
|
#include <arpa/inet.h>
|
|
49
50
|
#include <chrono>
|
|
50
51
|
#include <cstdint>
|
|
@@ -61,6 +62,15 @@
|
|
|
61
62
|
#include <unistd.h>
|
|
62
63
|
#include <vector>
|
|
63
64
|
|
|
65
|
+
// R 4.5+: Rf_findVar is no longer a public API entry (hidden in R 4.6).
|
|
66
|
+
// R_getVarEx(sym, rho, inherits, ifnotfound) is the supported replacement.
|
|
67
|
+
static inline SEXP galaaz_find_var(SEXP sym, SEXP env) {
|
|
68
|
+
#if defined(R_VERSION) && R_VERSION >= R_Version(4, 5, 0)
|
|
69
|
+
return R_getVarEx(sym, env, TRUE, R_UnboundValue);
|
|
70
|
+
#else
|
|
71
|
+
return Rf_findVar(sym, env);
|
|
72
|
+
#endif
|
|
73
|
+
}
|
|
64
74
|
// Active bridge socket used by main loop and callback path.
|
|
65
75
|
static int g_bridge_fd = -1;
|
|
66
76
|
// Instance id of the currently serviced REQ; reused by callback CALL messages.
|
|
@@ -848,7 +858,7 @@ EvalResult eval_unbox_walk_cmd(const std::string& cmd, const Rcpp::Environment&
|
|
|
848
858
|
}
|
|
849
859
|
|
|
850
860
|
SEXP sym = Rf_install(handle.c_str());
|
|
851
|
-
SEXP root =
|
|
861
|
+
SEXP root = galaaz_find_var(sym, env);
|
|
852
862
|
if (root == R_UnboundValue) return {false, payload_error("unbox_walk unknown handle")};
|
|
853
863
|
|
|
854
864
|
std::vector<std::pair<SEXP, int>> stack;
|
|
@@ -1001,7 +1011,7 @@ EvalResult eval_unbox_materialize_cmd(const std::string& cmd, const Rcpp::Enviro
|
|
|
1001
1011
|
}
|
|
1002
1012
|
|
|
1003
1013
|
SEXP sym = Rf_install(handle.c_str());
|
|
1004
|
-
SEXP root =
|
|
1014
|
+
SEXP root = galaaz_find_var(sym, env);
|
|
1005
1015
|
if (root == R_UnboundValue) return {false, payload_error("unbox_materialize unknown handle")};
|
|
1006
1016
|
|
|
1007
1017
|
std::vector<uint8_t> value_bytes;
|
|
@@ -1176,7 +1186,7 @@ static EvalResult eval_pull_vector_cmd(const std::string& cmd, const Rcpp::Envir
|
|
|
1176
1186
|
}
|
|
1177
1187
|
|
|
1178
1188
|
SEXP sym = Rf_install(handle.c_str());
|
|
1179
|
-
SEXP vec =
|
|
1189
|
+
SEXP vec = galaaz_find_var(sym, env);
|
|
1180
1190
|
if (vec == R_UnboundValue) {
|
|
1181
1191
|
return {false, payload_error("pull_vector unknown handle")};
|
|
1182
1192
|
}
|
data/lib/galaaz/cli.rb
CHANGED
|
@@ -87,8 +87,10 @@ module Galaaz
|
|
|
87
87
|
abort_unless(ok, 'make failed building ext/new_bridge')
|
|
88
88
|
so = File.join(bridge, 'galaaz_gatekeeper.so')
|
|
89
89
|
abort_unless(File.file?(so), "gatekeeper missing after build: #{so}")
|
|
90
|
+
mark_profile!('core')
|
|
90
91
|
puts 'galaaz setup: OK'
|
|
91
92
|
puts "You can now run: galaaz doctor"
|
|
93
|
+
puts 'Omarchy menu: Install → Development → Galaaz (add-ons appear after core)'
|
|
92
94
|
0
|
|
93
95
|
end
|
|
94
96
|
|
|
@@ -435,10 +437,27 @@ module Galaaz
|
|
|
435
437
|
install_cran!(['Rcpp'])
|
|
436
438
|
end
|
|
437
439
|
|
|
440
|
+
# Omarchy/Arch: /usr/lib/R/library is not writable for normal users.
|
|
441
|
+
def r_lib_bootstrap
|
|
442
|
+
<<~R
|
|
443
|
+
lib <- Sys.getenv("R_LIBS_USER", unset = "")
|
|
444
|
+
if (!nzchar(lib)) {
|
|
445
|
+
lib <- file.path(Sys.getenv("HOME"), ".local", "lib", "R", "library")
|
|
446
|
+
Sys.setenv(R_LIBS_USER = lib)
|
|
447
|
+
}
|
|
448
|
+
dir.create(lib, recursive = TRUE, showWarnings = FALSE)
|
|
449
|
+
.libPaths(c(lib, .libPaths()))
|
|
450
|
+
renviron <- file.path(Sys.getenv("HOME"), ".Renviron")
|
|
451
|
+
line <- paste0("R_LIBS_USER=", lib)
|
|
452
|
+
if (!file.exists(renviron) || !any(grepl("^R_LIBS_USER=", readLines(renviron, warn = FALSE)))) {
|
|
453
|
+
cat(line, "\\n", file = renviron, append = TRUE)
|
|
454
|
+
}
|
|
455
|
+
R
|
|
456
|
+
end
|
|
457
|
+
|
|
438
458
|
def r_namespace?(pkg)
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
)
|
|
459
|
+
script = "#{r_lib_bootstrap}\nquit(status=if (requireNamespace('#{pkg}', quietly=TRUE)) 0 else 1)"
|
|
460
|
+
_out, status = Open3.capture2e('Rscript', '-e', script)
|
|
442
461
|
status.success?
|
|
443
462
|
rescue Errno::ENOENT
|
|
444
463
|
false
|
|
@@ -447,13 +466,14 @@ module Galaaz
|
|
|
447
466
|
def install_cran!(pkgs)
|
|
448
467
|
list = pkgs.map { |p| "'#{p}'" }.join(', ')
|
|
449
468
|
script = <<~R
|
|
469
|
+
#{r_lib_bootstrap}
|
|
450
470
|
repos <- '#{CRAN}'
|
|
451
471
|
pkgs <- c(#{list})
|
|
452
472
|
inst <- rownames(installed.packages())
|
|
453
473
|
need <- pkgs[!pkgs %in% inst]
|
|
454
474
|
if (length(need)) {
|
|
455
|
-
message('Installing: ', paste(need, collapse=', '))
|
|
456
|
-
install.packages(need, repos = repos)
|
|
475
|
+
message('Installing into ', lib, ': ', paste(need, collapse=', '))
|
|
476
|
+
install.packages(need, lib = lib, repos = repos)
|
|
457
477
|
}
|
|
458
478
|
missing <- pkgs[!pkgs %in% rownames(installed.packages())]
|
|
459
479
|
if (length(missing)) {
|
|
@@ -470,14 +490,15 @@ module Galaaz
|
|
|
470
490
|
|
|
471
491
|
list = pkgs.map { |p| "'#{p}'" }.join(', ')
|
|
472
492
|
script = <<~R
|
|
493
|
+
#{r_lib_bootstrap}
|
|
473
494
|
repos <- '#{CRAN}'
|
|
474
495
|
pkgs <- c(#{list})
|
|
475
496
|
inst <- rownames(installed.packages())
|
|
476
497
|
need <- pkgs[!pkgs %in% inst]
|
|
477
498
|
if (length(need)) {
|
|
478
|
-
message('Installing (optional): ', paste(need, collapse=', '))
|
|
499
|
+
message('Installing (optional) into ', lib, ': ', paste(need, collapse=', '))
|
|
479
500
|
tryCatch(
|
|
480
|
-
install.packages(need, repos = repos),
|
|
501
|
+
install.packages(need, lib = lib, repos = repos),
|
|
481
502
|
error = function(e) message(e)
|
|
482
503
|
)
|
|
483
504
|
}
|
data/version.rb
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
$gem_name = "galaaz"
|
|
2
|
-
$version="2.1.
|
|
2
|
+
$version="2.1.3"
|
metadata
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: galaaz
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.1.
|
|
4
|
+
version: 2.1.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Rodrigo Botafogo
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
10
|
date: 2026-09-04 00:00:00.000000000 Z
|
|
@@ -87,11 +86,11 @@ description: |
|
|
|
87
86
|
email: rodrigo.a.botafogo@gmail.com
|
|
88
87
|
executables:
|
|
89
88
|
- galaaz
|
|
90
|
-
- gstudio
|
|
91
|
-
- gknit
|
|
92
89
|
- gbookdown
|
|
93
|
-
-
|
|
90
|
+
- gknit
|
|
94
91
|
- gknit-draft
|
|
92
|
+
- grun
|
|
93
|
+
- gstudio
|
|
95
94
|
extensions: []
|
|
96
95
|
extra_rdoc_files: []
|
|
97
96
|
files:
|
|
@@ -485,7 +484,6 @@ metadata:
|
|
|
485
484
|
documentation_uri: https://rbotafogo.github.io/galaaz/
|
|
486
485
|
changelog_uri: https://github.com/rbotafogo/galaaz/blob/galaaz2_0/CHANGELOG.md
|
|
487
486
|
yard.run: yri
|
|
488
|
-
post_install_message:
|
|
489
487
|
rdoc_options: []
|
|
490
488
|
require_paths:
|
|
491
489
|
- lib
|
|
@@ -500,8 +498,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
500
498
|
- !ruby/object:Gem::Version
|
|
501
499
|
version: '0'
|
|
502
500
|
requirements: []
|
|
503
|
-
rubygems_version:
|
|
504
|
-
signing_key:
|
|
501
|
+
rubygems_version: 4.0.3
|
|
505
502
|
specification_version: 4
|
|
506
503
|
summary: 'R-on-Rails: tightly couple Ruby and GNU R for data science on the web'
|
|
507
504
|
test_files: []
|