galaaz 2.1.10.pre.8 → 2.1.10.pre.10

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 49086d9d91136759ccda55167c3c7ba0960257b2ea01f552f11ea24c7bf0eb00
4
- data.tar.gz: a0227e50a79166c1d05c0609235f68e6be7504ff8fe6872b66821f274603b498
3
+ metadata.gz: 6c17cdef4fee4cef82633cf115d082b71a23f8bc6c837a144cb9377113b4b86a
4
+ data.tar.gz: 667874709ce613f990909eea6d952270c26019df5d0a21492addcb752c5cae4e
5
5
  SHA512:
6
- metadata.gz: 2ca73b7ea17b312f2213095f98215ebc8688e15c2127eda29c863b374e85583e71e78b9259e396e9ad88e876180a561128e05015b72f3d138b8f133fe08f5433
7
- data.tar.gz: c2824ae862e18e6f39b4e8590431d45c6ead857727b530d90c8edf95fc5e548c527d8c935ad544fbd3da17b03fa56d16165e0fe24787316ba0ef4dc66ec22def
6
+ metadata.gz: e48c834304c88e05905e7a33a5e3bedb8e11447459cfa5688c70848fb475b17ce115de36440a75106508bebba858eab3c73757aab7a6f8614e7292428df34711
7
+ data.tar.gz: 1111967bc3b3b7ac1de61209889015e5ba5fb3a9bd8a39d983e52273aa9a1f7e2388fcd9b18568a888ad927c6e87cb5df70e7d049ebc6d20184cfa2dadece36c
data/CHANGELOG.md CHANGED
@@ -2,6 +2,27 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 2.1.10.pre.10
6
+
7
+ ### Changed
8
+
9
+ - Omarchy: split Arrow menu into **Arrow (R only)** (`galaaz add arrow-r`) and
10
+ **Arrow (Ruby)** (`galaaz add arrow-ruby`). Ruby install always ensures R only
11
+ first; no Stage A/B labels in the UI. Legacy `galaaz add arrow` aliases to
12
+ `arrow-ruby`. Ledger/demo pull `arrow-ruby`. Guide, doctor, and Arrow debug
13
+ use the same wording. Examples tree ships `examples/README.md` with run hints.
14
+
15
+ ## 2.1.10.pre.9
16
+
17
+ ### Fixed
18
+
19
+ - Omarchy Arrow Stage B: slim arrow-glib build (hide flight/dataset/parquet from
20
+ pkg-config) to avoid TUI OOM; traced install log; doctor reports arrow C++ /
21
+ arrow-glib / R arrow / red-arrow; do not mark `profiles/arrow` until Stage B
22
+ succeeds; menu **Arrow debug** helper; persist `GI_TYPELIB_PATH` /
23
+ `LD_LIBRARY_PATH` in `~/.config/galaaz/arrow-env.sh` so `require "arrow"` works
24
+ without manual exports.
25
+
5
26
  ## 2.1.10.pre.8
6
27
 
7
28
  ### Fixed
@@ -7,7 +7,23 @@
7
7
  #
8
8
  # JRuby and CRuby are both first-class. Override with GALAAZ_RUBY=jruby, GALAAZ_RUBY=ruby,
9
9
  # or a full path. Extra JRuby flags: GALAAZ_JRUBY_OPTS="-J-Xmx4g" (ignored on CRuby).
10
- # CRuby red-arrow uses system Arrow GLib (Apache Arrow APT / libarrow-glib-dev).
10
+ # CRuby red-arrow uses system Arrow GLib (Apache Arrow APT / libarrow-glib-dev,
11
+ # or Omarchy build into /usr/local). Typelibs under /usr/local need GI_TYPELIB_PATH.
12
+ if [[ -f "${HOME}/.config/galaaz/arrow-env.sh" ]]; then
13
+ # shellcheck disable=SC1090
14
+ source "${HOME}/.config/galaaz/arrow-env.sh"
15
+ else
16
+ if [[ -d /usr/local/lib/girepository-1.0 ]]; then
17
+ export GI_TYPELIB_PATH="/usr/local/lib/girepository-1.0${GI_TYPELIB_PATH:+:${GI_TYPELIB_PATH}}"
18
+ fi
19
+ if [[ -d /usr/local/lib ]]; then
20
+ export LD_LIBRARY_PATH="/usr/local/lib${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}"
21
+ fi
22
+ if [[ -d /usr/local/lib64 ]]; then
23
+ export LD_LIBRARY_PATH="/usr/local/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}"
24
+ fi
25
+ export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}}"
26
+ fi
11
27
 
12
28
  GALAAZ_RUBY_BIN="${GALAAZ_RUBY:-ruby}"
13
29
 
@@ -0,0 +1,81 @@
1
+ # Galaaz examples
2
+
3
+ Copied here by `galaaz add examples` (default: `~/galaaz-examples`).
4
+
5
+ These are Ruby scripts that use the **installed `galaaz` gem** and GNU R. From a
6
+ git checkout you can also use `bin/run_example` / `bin/galaaz-ruby`; after a gem
7
+ install on Omarchy, use plain `ruby` as below.
8
+
9
+ ## Prerequisites
10
+
11
+ ```bash
12
+ galaaz doctor # setup OK, gatekeeper, Rcpp
13
+ # plots: galaaz add knit (ggplot2 and friends)
14
+ # Arrow IPC: galaaz add arrow (Stage A/B)
15
+ # Bio: galaaz add bio (DESeq2 / airway)
16
+ ```
17
+
18
+ If you built Arrow GLib under `/usr/local` (Omarchy Stage B):
19
+
20
+ ```bash
21
+ source ~/.config/galaaz/arrow-env.sh # or open a new shell after menu Arrow
22
+ ```
23
+
24
+ Graphical examples need a display (Omarchy Wayland session is fine).
25
+
26
+ ## Run a script (gem / Omarchy)
27
+
28
+ ```bash
29
+ cd ~/galaaz-examples
30
+
31
+ # small / misc
32
+ ruby misc/subsetting.rb
33
+ ruby misc/ggplot.rb
34
+
35
+ # ISLR chapter demos (installs ISLR/MASS on first run)
36
+ ruby islr/ch3_boston.rb
37
+
38
+ # ggplot gallery (many windows / plots)
39
+ ruby sthda_ggplot/one_variable_continuous/geom_density.rb
40
+ ruby sthda_ggplot/all.rb
41
+
42
+ # Bioconductor walkthrough (needs galaaz add bio)
43
+ ruby bioconductor_deseq2_airway/deseq2_airway_galaaz.rb
44
+
45
+ # Arrow shard handoff sketch (needs arrow)
46
+ ruby multithread_shards_to_r/shards_to_r.rb
47
+ ```
48
+
49
+ Under **mise**:
50
+
51
+ ```bash
52
+ mise x ruby -- ruby ~/galaaz-examples/misc/ggplot.rb
53
+ ```
54
+
55
+ ## Layout
56
+
57
+ | Directory | What |
58
+ |-----------|------|
59
+ | `misc/` | Short demos (subsetting, ggplot, moneyball) |
60
+ | `islr/` | ISLR book chapter scripts / specs |
61
+ | `sthda_ggplot/` | ggplot2 gallery (see `sthda_ggplot/README.md`, `RUN.md`) |
62
+ | `bioconductor_deseq2_airway/` | DESeq2 airway pipeline |
63
+ | `multithread_shards_to_r/` | Parallel shards → R / Arrow sketch |
64
+ | `rmarkdown/`, `latex_templates/` | Knit / LaTeX template samples (`gknit`) |
65
+ | `50Plots_MasterList/` | Extra plot scripts |
66
+
67
+ ## From a Galaaz git checkout
68
+
69
+ ```bash
70
+ bin/run_example examples/misc/ggplot.rb
71
+ bin/galaaz-ruby examples/bioconductor_deseq2_airway/deseq2_airway_galaaz.rb
72
+ # JRuby:
73
+ GALAAZ_RUBY=jruby bin/run_example examples/sthda_ggplot/all.rb
74
+ ```
75
+
76
+ ## Troubleshooting
77
+
78
+ - `cannot load such file -- galaaz` → `gem install galaaz` (or `gem list galaaz`)
79
+ - `Typelib file for namespace 'Arrow'` → `source ~/.config/galaaz/arrow-env.sh`
80
+ - Missing R packages → script often calls `R.install_and_loads`; or `galaaz add knit` / `bio`
81
+ - No plot window → run inside a graphical session, not a bare SSH TTY
@@ -44,6 +44,7 @@ module Galaaz
44
44
  def load!
45
45
  return if defined?(@loaded) && @loaded
46
46
 
47
+ ensure_arrow_glib_runtime_env!
47
48
  begin
48
49
  require 'arrow'
49
50
  rescue LoadError
@@ -60,6 +61,29 @@ module Galaaz
60
61
  end
61
62
  private_class_method :load!
62
63
 
64
+ # Omarchy / --prefix=/usr/local installs put typelibs and .so under /usr/local,
65
+ # which gobject-introspection and the dynamic linker do not search by default.
66
+ def ensure_arrow_glib_runtime_env!
67
+ gir = '/usr/local/lib/girepository-1.0'
68
+ if File.directory?(gir)
69
+ cur = ENV['GI_TYPELIB_PATH'].to_s.split(File::PATH_SEPARATOR)
70
+ ENV['GI_TYPELIB_PATH'] = ([gir] + cur).uniq.join(File::PATH_SEPARATOR)
71
+ end
72
+ %w[/usr/local/lib /usr/local/lib64].each do |lib|
73
+ next unless File.directory?(lib)
74
+
75
+ cur = ENV['LD_LIBRARY_PATH'].to_s.split(File::PATH_SEPARATOR)
76
+ ENV['LD_LIBRARY_PATH'] = ([lib] + cur).uniq.join(File::PATH_SEPARATOR)
77
+ end
78
+ %w[/usr/local/lib/pkgconfig /usr/local/lib64/pkgconfig].each do |pc|
79
+ next unless File.directory?(pc)
80
+
81
+ cur = ENV['PKG_CONFIG_PATH'].to_s.split(File::PATH_SEPARATOR)
82
+ ENV['PKG_CONFIG_PATH'] = ([pc] + cur).uniq.join(File::PATH_SEPARATOR)
83
+ end
84
+ end
85
+ private_class_method :ensure_arrow_glib_runtime_env!
86
+
63
87
  # bundle exec only exposes Gemfile gems; red-arrow is optional and often
64
88
  # user-installed. Put its lib + native extension on $LOAD_PATH.
65
89
  def prepend_user_red_arrow_load_path!
data/lib/galaaz/cli.rb CHANGED
@@ -11,7 +11,7 @@ module Galaaz
11
11
  BLOG_NAMES = %w[
12
12
  oh_my gknit galaaz_ggplot galaaz_2_0 r_on_rails_ledger manual nse_dplyr ruby_plot
13
13
  ].freeze
14
- PROFILES = %w[knit arrow tex bio examples ledger demo].freeze
14
+ PROFILES = %w[knit arrow-r arrow-ruby arrow tex bio examples ledger demo].freeze
15
15
  CONFIG_DIR = File.join(Dir.home, '.config', 'galaaz')
16
16
  PROFILES_DIR = File.join(CONFIG_DIR, 'profiles')
17
17
  DEFAULT_BLOGS_DIR = File.join(Dir.home, 'galaaz-blogs')
@@ -27,6 +27,7 @@ module Galaaz
27
27
  ['galaaz-add.sh', 'omarchy-galaaz-add', true],
28
28
  ['galaaz-guide.sh', 'omarchy-galaaz-guide', true],
29
29
  ['galaaz-gknit.sh', 'omarchy-galaaz-gknit', true],
30
+ ['galaaz-arrow-debug.sh', 'omarchy-galaaz-arrow-debug', true],
30
31
  ['debug-galaaz.sh', 'omarchy-galaaz-debug', true]
31
32
  ].freeze
32
33
  # Installed under ~/.local/share/nautilus/scripts/Galaaz/ (Scripts → Galaaz).
@@ -477,6 +478,8 @@ module Galaaz
477
478
  profiles = listed_profiles
478
479
  puts " profiles: #{profiles.empty? ? '(none)' : profiles.join(', ')}"
479
480
 
481
+ print_arrow_doctor_lines
482
+
480
483
  pdf = command_present?('pdflatex')
481
484
  puts " pdflatex: #{pdf ? `pdflatex --version 2>/dev/null`.lines.first.to_s.strip : 'MISSING (galaaz add tex)'}"
482
485
 
@@ -485,6 +488,41 @@ module Galaaz
485
488
  setup_ok ? 0 : 1
486
489
  end
487
490
 
491
+ def print_arrow_doctor_lines
492
+ ENV['PKG_CONFIG_PATH'] = [
493
+ '/usr/local/lib/pkgconfig',
494
+ '/usr/local/lib64/pkgconfig',
495
+ ENV['PKG_CONFIG_PATH']
496
+ ].compact.reject(&:empty?).join(File::PATH_SEPARATOR)
497
+
498
+ arrow_cpp = system('pkg-config', '--exists', 'arrow')
499
+ arrow_cpp_ver = arrow_cpp ? `pkg-config --modversion arrow 2>/dev/null`.strip : nil
500
+ arrow_glib = system('pkg-config', '--exists', 'arrow-glib')
501
+ arrow_glib_ver = arrow_glib ? `pkg-config --modversion arrow-glib 2>/dev/null`.strip : nil
502
+ r_arrow = command_present?('Rscript') && r_namespace?('arrow')
503
+ red =
504
+ begin
505
+ Gem::Specification.find_by_name('red-arrow')
506
+ true
507
+ rescue LoadError, Gem::LoadError
508
+ false
509
+ end
510
+
511
+ puts " arrow C++: #{arrow_cpp ? "OK (#{arrow_cpp_ver})" : 'MISSING (Omarchy: menu Arrow (Ruby) installs Arch arrow)'}"
512
+ puts " arrow-glib: #{arrow_glib ? "OK (#{arrow_glib_ver})" : 'MISSING (needed for Arrow (Ruby) / red-arrow)'}"
513
+ puts " R arrow: #{r_arrow ? 'OK' : 'MISSING (menu: Arrow (R only))'}"
514
+ puts " red-arrow: #{red ? 'OK' : 'MISSING (menu: Arrow (Ruby))'}"
515
+ if listed_profiles.include?('arrow') && !(arrow_glib && (RUBY_ENGINE != 'ruby' || red))
516
+ puts ' arrow tip: legacy profiles/arrow set but Ruby bridge incomplete —'
517
+ puts ' rm ~/.config/galaaz/profiles/arrow ~/.config/galaaz/profiles/arrow-ruby'
518
+ puts ' then: omarchy-galaaz-add arrow-ruby'
519
+ puts ' or: omarchy-galaaz-arrow-debug status'
520
+ elsif listed_profiles.include?('arrow-ruby') && !(arrow_glib && (RUBY_ENGINE != 'ruby' || red))
521
+ puts ' arrow tip: profiles/arrow-ruby set but bridge incomplete —'
522
+ puts ' rm ~/.config/galaaz/profiles/arrow-ruby && omarchy-galaaz-add arrow-ruby'
523
+ end
524
+ end
525
+
488
526
  def print_ruby_engines
489
527
  puts " this: #{RUBY_DESCRIPTION}"
490
528
  puts " engine: #{RUBY_ENGINE} (interpreter running doctor)"
@@ -584,7 +622,9 @@ module Galaaz
584
622
 
585
623
  case profile
586
624
  when 'knit' then add_knit
587
- when 'arrow' then add_arrow
625
+ when 'arrow-r' then add_arrow_r
626
+ when 'arrow-ruby' then add_arrow_ruby
627
+ when 'arrow' then add_arrow_ruby # alias: full Ruby bridge (includes R)
588
628
  when 'tex' then add_tex
589
629
  when 'bio' then add_bio
590
630
  when 'examples' then add_examples
@@ -593,7 +633,7 @@ module Galaaz
593
633
  end
594
634
 
595
635
  def add_demo
596
- %w[knit arrow ledger].each do |p|
636
+ %w[knit arrow-ruby ledger].each do |p|
597
637
  code = cmd_add([p])
598
638
  return code unless code.zero?
599
639
  end
@@ -637,40 +677,77 @@ module Galaaz
637
677
  0
638
678
  end
639
679
 
640
- def add_arrow
641
- # R 'arrow' needs a matching libarrow. Compiling Arrow C++ + Boost from the
642
- # CRAN source tarball is fragile (especially Arch/Omarchy). Distro libarrow
643
- # (e.g. Arch extra/arrow) often mismatches the CRAN package major and then
644
- # pkg-config configure fails. Apache's version-matched prebuilt libarrow is
645
- # the reliable automated path — HTTPS from Apache, no interactive steps.
680
+ # Arrow (R only): CRAN arrow via Apache prebuilt libarrow.
681
+ def add_arrow_r
682
+ if profile_marked?('arrow-r') && r_namespace?('arrow')
683
+ puts 'galaaz add arrow-r: already installed'
684
+ return 0
685
+ end
646
686
  prepare_arrow_cran_env!
647
687
  pkgs = read_pkg_list('arrow.txt')
648
688
  install_cran!(pkgs)
689
+ mark_profile!('arrow-r')
690
+ puts 'galaaz add arrow-r: OK (R only)'
691
+ 0
692
+ end
693
+
694
+ # Arrow (Ruby): R arrow first, then arrow-glib + red-arrow (CRuby) / JARs tip (JRuby).
695
+ def add_arrow_ruby
696
+ if profile_marked?('arrow-ruby') &&
697
+ (RUBY_ENGINE != 'ruby' || begin
698
+ Gem::Specification.find_by_name('red-arrow')
699
+ true
700
+ rescue Gem::LoadError
701
+ false
702
+ end)
703
+ puts 'galaaz add arrow-ruby: already installed'
704
+ return 0
705
+ end
706
+
707
+ code = add_arrow_r
708
+ return code unless code.zero?
709
+
649
710
  if RUBY_ENGINE == 'ruby'
711
+ ENV['GI_TYPELIB_PATH'] = [
712
+ '/usr/local/lib/girepository-1.0',
713
+ ENV['GI_TYPELIB_PATH']
714
+ ].compact.reject(&:empty?).join(File::PATH_SEPARATOR)
715
+ ENV['LD_LIBRARY_PATH'] = [
716
+ '/usr/local/lib',
717
+ '/usr/local/lib64',
718
+ ENV['LD_LIBRARY_PATH']
719
+ ].compact.reject(&:empty?).join(File::PATH_SEPARATOR)
650
720
  ENV['PKG_CONFIG_PATH'] = [
651
721
  '/usr/local/lib/pkgconfig',
652
722
  '/usr/local/lib64/pkgconfig',
723
+ '/usr/lib/pkgconfig',
653
724
  ENV['PKG_CONFIG_PATH']
654
725
  ].compact.reject(&:empty?).join(File::PATH_SEPARATOR)
655
726
  glib_ok = system('pkg-config', '--exists', 'arrow-glib')
656
727
  if glib_ok
657
- puts 'galaaz add arrow: gem install red-arrow (CRuby Stage B writer; MAKEFLAGS=-j1)'
658
- # Parallel native builds often OOM small Omarchy/TryOmarchy VMs.
728
+ puts 'galaaz add arrow-ruby: gem install red-arrow (MAKEFLAGS=-j1)'
659
729
  ok = system({ 'MAKEFLAGS' => '-j1', 'PKG_CONFIG_PATH' => ENV['PKG_CONFIG_PATH'] },
660
730
  'gem', 'install', 'red-arrow', '--no-document')
661
731
  unless ok
662
- warn 'galaaz add arrow: red-arrow gem install failed. R arrow is installed; ' \
732
+ warn 'galaaz add arrow-ruby: red-arrow gem install failed. R arrow is installed; ' \
663
733
  'Ruby IPC writer may be unavailable.'
734
+ warn 'galaaz add arrow-ruby: profile NOT marked — fix then re-run ' \
735
+ '(omarchy-galaaz-arrow-debug status)'
736
+ return 1
664
737
  end
665
738
  else
666
- warn 'galaaz add arrow: arrow-glib not found (pkg-config); skipping red-arrow. ' \
667
- 'On Omarchy use omarchy-galaaz-add arrow so Stage B GLib is built first.'
739
+ warn 'galaaz add arrow-ruby: arrow-glib not found (pkg-config); skipping red-arrow. ' \
740
+ 'On Omarchy use: omarchy-galaaz-add arrow-ruby (builds GLib first).'
741
+ warn 'galaaz add arrow-ruby: profile NOT marked'
742
+ return 1
668
743
  end
669
744
  else
670
- warn 'galaaz add arrow: on JRuby, set GALAAZ_ARROW_JARS (or ~/arrow_jars) and JAVA_OPTS nio opens for Arrow Java'
745
+ warn 'galaaz add arrow-ruby: on JRuby, set GALAAZ_ARROW_JARS (or ~/arrow_jars) ' \
746
+ 'and JAVA_OPTS nio opens for Arrow Java'
671
747
  end
672
- mark_profile!('arrow')
673
- puts 'galaaz add arrow: OK'
748
+ mark_profile!('arrow-ruby')
749
+ mark_profile!('arrow') # legacy marker (older menus / scripts)
750
+ puts 'galaaz add arrow-ruby: OK'
674
751
  0
675
752
  end
676
753
 
@@ -682,7 +759,7 @@ module Galaaz
682
759
  ENV['LIBARROW_BUILD'] = 'false'
683
760
  # Avoid linking against a mismatched system libarrow (e.g. pacman 24.x vs CRAN 25.x).
684
761
  ENV['ARROW_USE_PKG_CONFIG'] = 'false'
685
- puts 'galaaz add arrow: LIBARROW_BINARY=true (Apache prebuilt libarrow; no source build)'
762
+ puts 'galaaz add arrow-r: LIBARROW_BINARY=true (Apache prebuilt libarrow; no source build)'
686
763
  end
687
764
 
688
765
  def add_tex
@@ -736,13 +813,17 @@ module Galaaz
736
813
  File.write(File.join(dest, EXAMPLES_MARKER), "galaaz add examples\n")
737
814
  mark_profile!('examples')
738
815
  puts "galaaz add examples: #{dest}"
816
+ puts 'Try:'
817
+ puts " ruby #{File.join(dest, 'misc', 'ggplot.rb')}"
818
+ puts " ruby #{File.join(dest, 'sthda_ggplot', 'one_variable_continuous', 'geom_density.rb')}"
819
+ puts " less #{File.join(dest, 'README.md')}"
739
820
  0
740
821
  end
741
822
 
742
823
  def add_ledger
743
- unless profile_marked?('arrow') || r_namespace?('arrow')
744
- puts 'galaaz add ledger: installing arrow profile first'
745
- code = add_arrow
824
+ unless profile_marked?('arrow-ruby') || profile_marked?('arrow')
825
+ puts 'galaaz add ledger: installing arrow-ruby first (includes Arrow R only)'
826
+ code = add_arrow_ruby
746
827
  return code unless code.zero?
747
828
  end
748
829
 
@@ -73,14 +73,16 @@ Core configures **setup + blogs + doctor** using the gem you already installed
73
73
  (it does **not** run `gem install` again). It fails if the gatekeeper `.so` is
74
74
  missing — “gem installed” alone is not success.
75
75
 
76
- 4. After core finishes, the same submenu shows Knit / Arrow / TeX / Bio / Examples / Ledger.
76
+ 4. After core finishes, the same submenu shows Knit / Arrow (R only) / Arrow (Ruby) /
77
+ TeX / Bio / Examples / Ledger.
77
78
 
78
79
  5. **Ledger (required dogfood / pitch):** Install → Development → **Galaaz → Ledger**
79
- (or `omarchy-galaaz-add ledger` / `galaaz add ledger`). That pulls **arrow** if
80
- needed using Apache’s **LIBARROW_BINARY** prebuilt libarrow (no manual steps;
81
- Arch `pacman` arrow is not used for the R package — version skew breaks
82
- configure), clones `~/r_on_rails_ledger`, rewrites any `path:` gem to RubyGems
83
- galaaz, then `bundle install` + fast seed.
80
+ (or `omarchy-galaaz-add ledger` / `galaaz add ledger`). That pulls **arrow-ruby**
81
+ if needed (Arrow R only first, then arrow-glib / red-arrow). R’s CRAN arrow uses
82
+ Apache’s **LIBARROW_BINARY** prebuilt libarrow (no manual steps; Arch `pacman`
83
+ arrow is not used for the R package — version skew breaks configure), clones
84
+ `~/r_on_rails_ledger`, rewrites any `path:` gem to RubyGems galaaz, then
85
+ `bundle install` + fast seed.
84
86
 
85
87
  **Knit / TeX pandoc:** the add wrapper does **not** install Arch `pandoc` /
86
88
  `pandoc-cli` (Haskell mega-deps; often fails on TryOmarchy). It uses
@@ -3,13 +3,13 @@
3
3
  # - Installs system deps the gem cannot (e.g. pandoc for knit)
4
4
  # - Keeps the TUI open on success/failure so errors are readable
5
5
  #
6
- # Usage: omarchy-galaaz-add knit|arrow|tex|bio|examples|ledger|demo
6
+ # Usage: omarchy-galaaz-add knit|arrow-r|arrow-ruby|arrow|tex|bio|examples|ledger|demo
7
7
  set -euo pipefail
8
8
 
9
9
  PROFILE="${1:-}"
10
10
  if [[ -z "${PROFILE}" ]]; then
11
11
  echo "Usage: omarchy-galaaz-add <profile>"
12
- echo "Profiles: knit arrow tex bio examples ledger demo"
12
+ echo "Profiles: knit arrow-r arrow-ruby arrow tex bio examples ledger demo"
13
13
  exit 1
14
14
  fi
15
15
 
@@ -142,32 +142,57 @@ pkg_add_synced() {
142
142
  return 0
143
143
  }
144
144
 
145
- # red-arrow (Stage B) needs pkg-config "arrow" + "arrow-glib" at the same version.
146
- # Arch ships C++ Arrow (extra/arrow) but not Arrow GLib — build GLib from the
147
- # matching Apache tarball. Keep ARROW_USE_PKG_CONFIG=false for CRAN R arrow
148
- # (LIBARROW_BINARY); pacman arrow is only for the Ruby gem.
149
- #
150
- # Small Omarchy/TryOmarchy VMs OOM and kill the TUI during unlimited ninja builds.
151
- # We: default -j1, optional build swap, compile in a systemd user scope, heartbeat.
145
+ # Persist runtime env for red-arrow (typelibs + .so under /usr/local).
146
+ write_arrow_runtime_env() {
147
+ local dest="${HOME}/.config/galaaz/arrow-env.sh"
148
+ mkdir -p "$(dirname "${dest}")"
149
+ cat >"${dest}" <<'EOF'
150
+ # Generated by omarchy-galaaz-add arrow red-arrow / GObject Introspection
151
+ export GI_TYPELIB_PATH="/usr/local/lib/girepository-1.0${GI_TYPELIB_PATH:+:${GI_TYPELIB_PATH}}"
152
+ export LD_LIBRARY_PATH="/usr/local/lib:/usr/local/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}"
153
+ export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig:/usr/lib/pkgconfig${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}}"
154
+ EOF
155
+ # shellcheck disable=SC1090
156
+ source "${dest}"
157
+ echo "arrow runtime env: ${dest}"
158
+ }
159
+
160
+ # red-arrow (Arrow Ruby) needs pkg-config "arrow" + "arrow-glib" at the same version.
161
+ # Arch ships C++ Arrow but not Arrow GLib. We build only c_glib from the Apache
162
+ # tarball against pacman arrow — with a *slim* PKG_CONFIG_PATH so meson does not
163
+ # also link flight/dataset/parquet (those explode RAM on TryOmarchy and kill the TUI).
152
164
  ensure_arrow_for_red_arrow() {
153
165
  local major ver tmp tarball url build_dir jobs cache log swapfile avail_mb swap_mb
154
- local compile_st=0
166
+ local compile_st=0 pc_slim pc_src free_kb need_kb
167
+ local trace_log="${HOME}/.local/share/galaaz/arrow-install-trace.log"
155
168
  major=25
156
169
  jobs="${GALAAZ_ARROW_GLIB_JOBS:-1}"
157
170
  cache="${HOME}/.cache/galaaz"
158
171
  log="${HOME}/.local/share/galaaz/arrow-glib-build.log"
159
172
  swapfile="${cache}/arrow-glib.swap"
160
- mkdir -p "${cache}" "$(dirname "${log}")"
173
+ pc_slim="${cache}/pkgconfig-slim"
174
+ mkdir -p "${cache}" "$(dirname "${log}")" "$(dirname "${trace_log}")"
175
+
176
+ atracel() {
177
+ echo "[$(date -Iseconds)] $*" | tee -a "${trace_log}"
178
+ sync 2>/dev/null || true
179
+ }
180
+
181
+ : >"${trace_log}"
182
+ atracel "ensure_arrow_for_red_arrow start"
183
+ echo "==> system: Apache Arrow C++ + GLib (Arrow Ruby / red-arrow)"
184
+ echo " build log: ${log}"
185
+ echo " trace log: ${trace_log}"
161
186
 
162
- echo "==> system: Apache Arrow C++ + GLib (Stage B / red-arrow)"
163
- echo " build log: ${log}"
164
187
  export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}}"
165
188
 
166
189
  if ! command -v pkg-config >/dev/null 2>&1; then
190
+ atracel "install pkgconf"
167
191
  pkg_add_synced pkgconf || return 1
168
192
  fi
169
193
 
170
194
  if ! pkg-config --exists "arrow >= ${major}" 2>/dev/null; then
195
+ atracel "install Arch package arrow"
171
196
  echo "==> install Arch package: arrow"
172
197
  if ! pkg_add_synced arrow; then
173
198
  echo "ERROR: failed to install Arch arrow (Apache Arrow C++)" >&2
@@ -177,139 +202,161 @@ ensure_arrow_for_red_arrow() {
177
202
 
178
203
  if ! pkg-config --exists "arrow >= ${major}" 2>/dev/null; then
179
204
  echo "ERROR: Apache Arrow C++ >= ${major} still missing after pacman install" >&2
180
- echo " pkg-config --modversion arrow: $(pkg-config --modversion arrow 2>/dev/null || echo none)" >&2
181
205
  return 1
182
206
  fi
183
207
  ver="$(pkg-config --modversion arrow)"
208
+ atracel "arrow C++ ${ver}"
184
209
  echo "arrow (C++): ${ver}"
185
210
 
186
- if pkg-config --exists "arrow-glib = ${ver}" 2>/dev/null; then
211
+ if pkg-config --exists "arrow-glib = ${ver}" 2>/dev/null || pkg-config --exists arrow-glib 2>/dev/null; then
212
+ atracel "arrow-glib already present $(pkg-config --modversion arrow-glib)"
187
213
  echo "arrow-glib: $(pkg-config --modversion arrow-glib) (already installed)"
214
+ write_arrow_runtime_env
188
215
  return 0
189
216
  fi
190
217
 
191
- echo "==> Arrow GLib ${ver} missing — building from Apache source (required for Stage B)"
192
- echo " ninja jobs: ${jobs} (override with GALAAZ_ARROW_GLIB_JOBS)"
193
- # glib2-devel provides glib-mkenums (split from glib2 on Arch); without it meson fails.
218
+ atracel "arrow-glib missing — slim source build"
219
+ echo "==> Arrow GLib ${ver} missing building slim c_glib from Apache source"
220
+ echo " (flight/dataset/parquet disabled via slim pkg-config to avoid OOM)"
194
221
  pkg_add_synced meson ninja gobject-introspection glib2 glib2-devel cmake || return 1
195
222
 
223
+ # Slim pkg-config: only core Arrow modules + GLib (hide flight/dataset/parquet/…).
224
+ rm -rf "${pc_slim}"
225
+ mkdir -p "${pc_slim}"
226
+ for mod in arrow arrow-compute arrow-csv arrow-json arrow-filesystem \
227
+ glib-2.0 gobject-2.0 gio-2.0 gmodule-2.0 gthread-2.0 libffi zlib; do
228
+ pc_src="$(pkg-config --variable=pcfiledir "${mod}" 2>/dev/null || true)"
229
+ if [[ -n "${pc_src}" && -f "${pc_src}/${mod}.pc" ]]; then
230
+ cp "${pc_src}/${mod}.pc" "${pc_slim}/"
231
+ atracel "pc slim: ${mod}"
232
+ fi
233
+ done
234
+ export PKG_CONFIG_PATH="${pc_slim}:/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig"
235
+ atracel "PKG_CONFIG_PATH=${PKG_CONFIG_PATH}"
236
+
196
237
  avail_mb="$(awk '/MemAvailable:/ {print int($2/1024)}' /proc/meminfo 2>/dev/null || echo 0)"
197
238
  swap_mb="$(awk '/SwapFree:/ {print int($2/1024)}' /proc/meminfo 2>/dev/null || echo 0)"
239
+ atracel "memory MemAvailable=${avail_mb}MiB SwapFree=${swap_mb}MiB"
198
240
  echo " memory: MemAvailable=${avail_mb}MiB SwapFree=${swap_mb}MiB"
199
- if (( avail_mb + swap_mb < 3500 )); then
200
- echo "==> low RAM enabling 4GiB build swap at ${swapfile}"
241
+ if (( avail_mb + swap_mb < 3000 )); then
242
+ free_kb="$(df -Pk "${cache}" | awk 'NR==2{print $4}')"
243
+ need_kb=$((2200 * 1024))
244
+ if [[ -n "${free_kb}" ]] && (( free_kb < need_kb )); then
245
+ echo "ERROR: need ~2.2GiB free disk under ${cache} for build swap (have $((free_kb/1024))MiB)" >&2
246
+ atracel "ABORT disk free ${free_kb}KB"
247
+ return 1
248
+ fi
249
+ echo "==> low RAM — enabling 2GiB build swap at ${swapfile}"
250
+ atracel "create/enable swap ${swapfile}"
201
251
  if [[ ! -f "${swapfile}" ]]; then
202
- if ! dd if=/dev/zero of="${swapfile}" bs=1M count=4096 status=none; then
203
- echo "ERROR: could not create build swap file (need ~4GiB free disk)" >&2
204
- return 1
252
+ if command -v fallocate >/dev/null 2>&1; then
253
+ fallocate -l 2G "${swapfile}" || dd if=/dev/zero of="${swapfile}" bs=1M count=2048 status=none
254
+ else
255
+ dd if=/dev/zero of="${swapfile}" bs=1M count=2048 status=none
205
256
  fi
206
257
  chmod 600 "${swapfile}"
207
258
  mkswap "${swapfile}" >/dev/null
208
259
  fi
209
- if ! sudo swapon "${swapfile}"; then
210
- echo "ERROR: swapon ${swapfile} failed" >&2
260
+ sudo swapon "${swapfile}" || {
261
+ echo "ERROR: swapon failed" >&2
211
262
  return 1
212
- fi
263
+ }
213
264
  fi
214
265
 
215
266
  tarball="apache-arrow-${ver}.tar.gz"
216
267
  url="https://dlcdn.apache.org/arrow/arrow-${ver}/${tarball}"
217
- # Prefer ~/.cache over /tmp — /tmp is often tmpfs and competes with the compile for RAM.
218
268
  tmp="${cache}/arrow-${ver}-src"
219
269
  rm -rf "${tmp}"
220
270
  mkdir -p "${tmp}"
221
271
  build_dir="${tmp}/apache-arrow-${ver}"
222
272
  : >"${log}"
273
+ atracel "download ${url}"
223
274
  echo "==> download: ${url}"
224
275
  if ! curl -fsSL -o "${tmp}/${tarball}" "${url}"; then
225
276
  url="https://archive.apache.org/dist/arrow/arrow-${ver}/${tarball}"
277
+ atracel "fallback ${url}"
226
278
  echo "==> fallback: ${url}"
227
279
  if ! curl -fsSL -o "${tmp}/${tarball}" "${url}"; then
228
280
  echo "ERROR: failed to download Apache Arrow ${ver} sources" >&2
229
281
  sudo swapoff "${swapfile}" 2>/dev/null || true
230
- rm -rf "${tmp}"
231
282
  return 1
232
283
  fi
233
284
  fi
234
- if ! tar -xzf "${tmp}/${tarball}" -C "${tmp}"; then
235
- echo "ERROR: failed to extract ${tarball}" >&2
285
+ atracel "extract ${tarball}"
286
+ tar -xzf "${tmp}/${tarball}" -C "${tmp}" || {
236
287
  sudo swapoff "${swapfile}" 2>/dev/null || true
237
- rm -rf "${tmp}"
238
288
  return 1
239
- fi
240
- if [[ ! -d "${build_dir}/c_glib" ]]; then
241
- echo "ERROR: c_glib missing from ${tarball}" >&2
289
+ }
290
+ [[ -d "${build_dir}/c_glib" ]] || {
291
+ echo "ERROR: c_glib missing" >&2
242
292
  sudo swapoff "${swapfile}" 2>/dev/null || true
243
- rm -rf "${tmp}"
244
293
  return 1
245
- fi
294
+ }
246
295
 
247
- echo "==> meson setup arrow-glib ${ver}"
296
+ atracel "meson setup"
297
+ echo "==> meson setup arrow-glib ${ver} (slim)"
248
298
  if ! meson setup "${build_dir}/c_glib.build" "${build_dir}/c_glib" \
249
299
  --buildtype=release \
250
300
  --prefix=/usr/local \
251
301
  -Dgtk_doc=false \
252
302
  -Ddoc=false \
253
303
  -Dvapi=false >>"${log}" 2>&1; then
254
- echo "ERROR: meson setup for arrow-glib failed" >&2
304
+ echo "ERROR: meson setup failed see ${log}" >&2
255
305
  tail -n 40 "${log}" || true
256
306
  sudo swapoff "${swapfile}" 2>/dev/null || true
257
- rm -rf "${tmp}"
258
307
  return 1
259
308
  fi
260
309
 
261
- echo "==> meson compile arrow-glib ${ver} (-j${jobs}) — can take several minutes"
262
- echo " leave this window open; progress also in ${log}"
263
- # Isolate from the TUI cgroup when possible so an OOM kills the build, not the terminal.
310
+ atracel "meson compile -j${jobs} begin"
311
+ echo "==> meson compile arrow-glib ${ver} (-j${jobs}) — leave window open"
264
312
  set +e
265
- if command -v systemd-run >/dev/null 2>&1; then
266
- systemd-run --user --scope --quiet \
267
- -p MemoryMax=8G \
268
- -E "PKG_CONFIG_PATH=${PKG_CONFIG_PATH:-}" \
269
- -E "PATH=${PATH}" \
270
- meson compile -C "${build_dir}/c_glib.build" -j "${jobs}" >>"${log}" 2>&1 &
271
- else
272
- meson compile -C "${build_dir}/c_glib.build" -j "${jobs}" >>"${log}" 2>&1 &
273
- fi
313
+ meson compile -C "${build_dir}/c_glib.build" -j "${jobs}" >>"${log}" 2>&1 &
274
314
  local compile_pid=$!
275
315
  while kill -0 "${compile_pid}" 2>/dev/null; do
276
- echo " … still compiling arrow-glib ($(date +%H:%M:%S))"
277
- sleep 20
316
+ echo " … compiling arrow-glib ($(date +%H:%M:%S)) log: ${log}"
317
+ atracel "heartbeat compile pid=${compile_pid}"
318
+ sleep 15
278
319
  done
279
320
  wait "${compile_pid}"
280
321
  compile_st=$?
281
322
  set -e
323
+ atracel "meson compile exit ${compile_st}"
282
324
 
283
325
  if [[ "${compile_st}" -ne 0 ]]; then
284
- echo "ERROR: meson compile for arrow-glib failed (exit ${compile_st}) — often OOM" >&2
285
- echo " log: ${log}" >&2
286
- tail -n 40 "${log}" || true
287
- echo " Retry with more swap free disk, close other apps, or GALAAZ_ARROW_GLIB_JOBS=1" >&2
326
+ echo "ERROR: meson compile failed (exit ${compile_st})" >&2
327
+ tail -n 60 "${log}" || true
328
+ dmesg -T 2>/dev/null | grep -iE 'oom|killed process' | tail -5 || true
288
329
  sudo swapoff "${swapfile}" 2>/dev/null || true
289
- rm -rf "${tmp}"
290
330
  return 1
291
331
  fi
292
332
 
333
+ atracel "meson install"
293
334
  echo "==> meson install arrow-glib ${ver}"
294
335
  if ! sudo meson install -C "${build_dir}/c_glib.build" >>"${log}" 2>&1; then
295
- echo "ERROR: meson install for arrow-glib failed" >&2
296
- tail -n 40 "${log}" || true
336
+ echo "ERROR: meson install failed see ${log}" >&2
297
337
  sudo swapoff "${swapfile}" 2>/dev/null || true
298
- rm -rf "${tmp}"
299
338
  return 1
300
339
  fi
301
-
302
340
  sudo ldconfig 2>/dev/null || true
303
341
  sudo swapoff "${swapfile}" 2>/dev/null || true
304
342
  rm -rf "${tmp}"
305
343
 
344
+ # Restore normal pkg-config path so arrow-glib in /usr/local is visible.
345
+ export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}}"
306
346
  if ! pkg-config --exists "arrow-glib = ${ver}" 2>/dev/null; then
307
- echo "ERROR: arrow-glib ${ver} still missing after build" >&2
308
- echo " pkg-config --modversion arrow-glib: $(pkg-config --modversion arrow-glib 2>/dev/null || echo none)" >&2
309
- echo " log: ${log}" >&2
347
+ # arrow-glib.pc may only need to exist; version equality with slim build
348
+ if pkg-config --exists arrow-glib 2>/dev/null; then
349
+ atracel "arrow-glib present $(pkg-config --modversion arrow-glib)"
350
+ echo "arrow-glib: $(pkg-config --modversion arrow-glib)"
351
+ return 0
352
+ fi
353
+ echo "ERROR: arrow-glib still missing after install" >&2
354
+ atracel "ABORT arrow-glib missing"
310
355
  return 1
311
356
  fi
312
- echo "arrow-glib: $(pkg-config --modversion arrow-glib) (built from Apache ${ver})"
357
+ atracel "OK arrow-glib $(pkg-config --modversion arrow-glib)"
358
+ echo "arrow-glib: $(pkg-config --modversion arrow-glib) (slim build from Apache ${ver})"
359
+ write_arrow_runtime_env
313
360
  return 0
314
361
  }
315
362
 
@@ -342,10 +389,17 @@ case "${PROFILE}" in
342
389
  pause 1
343
390
  fi
344
391
  ;;
345
- arrow|ledger|demo)
346
- # R package arrow: do NOT link pacman arrow (version skew vs CRAN)
347
- # LIBARROW_BINARY uses Apache's version-matched prebuilt. pacman arrow +
348
- # built arrow-glib are only for CRuby red-arrow (Stage B).
392
+ arrow-r)
393
+ # R package arrow only Apache prebuilt libarrow (no system GLib / red-arrow).
394
+ export LIBARROW_BINARY=true
395
+ export NOT_CRAN=true
396
+ export LIBARROW_BUILD=false
397
+ export ARROW_USE_PKG_CONFIG=false
398
+ echo "==> arrow env: LIBARROW_BINARY=true LIBARROW_BUILD=false ARROW_USE_PKG_CONFIG=false"
399
+ ;;
400
+ arrow-ruby|arrow|ledger|demo)
401
+ # Arrow (Ruby) needs R arrow first, then pacman arrow + arrow-glib + red-arrow.
402
+ # LIBARROW_* is for CRAN R arrow; pacman arrow + glib are for the Ruby gem only.
349
403
  export LIBARROW_BINARY=true
350
404
  export NOT_CRAN=true
351
405
  export LIBARROW_BUILD=false
@@ -0,0 +1,225 @@
1
+ #!/bin/bash
2
+ # Stepwise Arrow/Stage-B diagnostics for Omarchy.
3
+ # Does NOT install by default — prints where things stand and what would run.
4
+ #
5
+ # Usage:
6
+ # omarchy-galaaz-arrow-debug # status (safe)
7
+ # omarchy-galaaz-arrow-debug status
8
+ # omarchy-galaaz-arrow-debug probe # light checks + write report
9
+ # omarchy-galaaz-arrow-debug last-log # show build log tails + dmesg OOM
10
+ # omarchy-galaaz-arrow-debug install # run omarchy-galaaz-add arrow-ruby with tracing
11
+ #
12
+ # Report: ~/.local/share/galaaz/arrow-debug.log
13
+ set -uo pipefail
14
+
15
+ LOG_DIR="${HOME}/.local/share/galaaz"
16
+ REPORT="${LOG_DIR}/arrow-debug.log"
17
+ BUILD_LOG="${LOG_DIR}/arrow-glib-build.log"
18
+ TRACE="${LOG_DIR}/arrow-install-trace.log"
19
+ mkdir -p "${LOG_DIR}"
20
+
21
+ export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}}"
22
+ export PATH="${HOME}/.local/bin:${PATH}"
23
+
24
+ CMD="${1:-status}"
25
+
26
+ trace() {
27
+ # shellcheck disable=SC3037
28
+ echo -e "[$(date -Iseconds)] $*" | tee -a "${REPORT}"
29
+ sync 2>/dev/null || true
30
+ }
31
+
32
+ section() {
33
+ echo | tee -a "${REPORT}"
34
+ trace "======== $* ========"
35
+ }
36
+
37
+ have() { command -v "$1" >/dev/null 2>&1; }
38
+
39
+ run_status() {
40
+ : >"${REPORT}"
41
+ section "galaaz arrow debug (status)"
42
+ trace "host: $(uname -a 2>/dev/null || true)"
43
+ trace "user: $(id -un) home=${HOME}"
44
+ trace "PATH=${PATH}"
45
+
46
+ section "memory / disk"
47
+ if [[ -r /proc/meminfo ]]; then
48
+ awk '/MemTotal:|MemAvailable:|SwapTotal:|SwapFree:/ {printf " %s\n", $0}' /proc/meminfo | tee -a "${REPORT}"
49
+ fi
50
+ df -h "${HOME}" /tmp /usr/local 2>/dev/null | tee -a "${REPORT}" || true
51
+ free -h 2>/dev/null | tee -a "${REPORT}" || true
52
+
53
+ section "tools"
54
+ for c in pacman omarchy-pkg-add pkg-config meson ninja cmake curl sudo systemd-run \
55
+ galaaz omarchy-galaaz-add ruby gem Rscript mise; do
56
+ if have "${c}"; then
57
+ trace "OK ${c}: $(command -v "${c}")"
58
+ else
59
+ trace "MISS ${c}"
60
+ fi
61
+ done
62
+
63
+ section "pkg-config Arrow"
64
+ if have pkg-config; then
65
+ trace "PKG_CONFIG_PATH=${PKG_CONFIG_PATH}"
66
+ if pkg-config --exists arrow; then
67
+ trace "OK arrow: $(pkg-config --modversion arrow)"
68
+ else
69
+ trace "MISS arrow (C++)"
70
+ fi
71
+ if pkg-config --exists arrow-glib; then
72
+ trace "OK arrow-glib: $(pkg-config --modversion arrow-glib)"
73
+ else
74
+ trace "MISS arrow-glib (needed for Arrow (Ruby) / red-arrow)"
75
+ fi
76
+ fi
77
+
78
+ section "Ruby red-arrow gem"
79
+ if have mise; then
80
+ mise x ruby -- gem list -e red-arrow 2>/dev/null | tee -a "${REPORT}" || trace "red-arrow: not installed"
81
+ elif have gem; then
82
+ gem list -e red-arrow 2>/dev/null | tee -a "${REPORT}" || trace "red-arrow: not installed"
83
+ fi
84
+
85
+ section "R package arrow"
86
+ if have Rscript; then
87
+ Rscript -e 'if (requireNamespace("arrow", quietly=TRUE)) cat("OK R arrow", as.character(packageVersion("arrow")), "\n") else cat("MISS R arrow\n")' 2>&1 | tee -a "${REPORT}"
88
+ fi
89
+
90
+ section "galaaz profile markers"
91
+ ls -la "${HOME}/.config/galaaz/profiles/" 2>/dev/null | tee -a "${REPORT}" || trace "no profiles dir"
92
+ if [[ -f "${HOME}/.config/galaaz/profiles/arrow-r" ]]; then
93
+ trace "OK profiles/arrow-r (Arrow R only) — menu row disabled"
94
+ else
95
+ trace "MISS profiles/arrow-r"
96
+ fi
97
+ if [[ -f "${HOME}/.config/galaaz/profiles/arrow-ruby" ]]; then
98
+ trace "OK profiles/arrow-ruby (Arrow Ruby) — menu row disabled"
99
+ else
100
+ trace "MISS profiles/arrow-ruby"
101
+ fi
102
+ if [[ -f "${HOME}/.config/galaaz/profiles/arrow" ]]; then
103
+ trace "NOTE: legacy profiles/arrow also present"
104
+ fi
105
+
106
+ section "prior build / install logs"
107
+ for f in "${BUILD_LOG}" "${TRACE}" "${REPORT}"; do
108
+ if [[ -f "${f}" ]]; then
109
+ trace "file ${f} ($(wc -c <"${f}") bytes, mtime $(date -r "${f}" -Iseconds 2>/dev/null || true))"
110
+ fi
111
+ done
112
+
113
+ section "verdict"
114
+ local a=0 g=0 r=0 ra=0
115
+ pkg-config --exists arrow 2>/dev/null && a=1
116
+ pkg-config --exists arrow-glib 2>/dev/null && g=1
117
+ if have Rscript; then
118
+ Rscript -e 'quit(status=if (requireNamespace("arrow", quietly=TRUE)) 0 else 1)' 2>/dev/null && r=1 || true
119
+ fi
120
+ if have mise; then
121
+ mise x ruby -- ruby -e 'gem "red-arrow"; puts' 2>/dev/null && ra=1 || true
122
+ elif have ruby; then
123
+ ruby -e 'gem "red-arrow"; puts' 2>/dev/null && ra=1 || true
124
+ fi
125
+ trace "Arrow (R only): $([[ ${r} -eq 1 ]] && echo OK || echo MISSING)"
126
+ trace "Arrow C++ (pkg-config): $([[ ${a} -eq 1 ]] && echo OK || echo MISSING)"
127
+ trace "Arrow GLib: $([[ ${g} -eq 1 ]] && echo OK || echo MISSING)"
128
+ trace "Arrow (Ruby)/red-arrow:$([[ ${ra} -eq 1 ]] && echo OK || echo MISSING)"
129
+ if [[ ${r} -eq 1 && ${g} -eq 1 && ${ra} -eq 1 ]]; then
130
+ trace "RESULT: Arrow (R only) + Arrow (Ruby) look OK"
131
+ elif [[ ${r} -eq 1 ]]; then
132
+ trace "RESULT: Arrow (R only) OK; Arrow (Ruby) incomplete — menu: Arrow (Ruby)"
133
+ else
134
+ trace "RESULT: Arrow not fully installed — start with menu: Arrow (R only)"
135
+ fi
136
+ trace "Full report: ${REPORT}"
137
+ }
138
+
139
+ run_last_log() {
140
+ section "arrow-glib-build.log (last 80 lines)"
141
+ if [[ -f "${BUILD_LOG}" ]]; then
142
+ tail -n 80 "${BUILD_LOG}" | tee -a "${REPORT}"
143
+ else
144
+ trace "no ${BUILD_LOG}"
145
+ fi
146
+ section "arrow-install-trace.log (last 80 lines)"
147
+ if [[ -f "${TRACE}" ]]; then
148
+ tail -n 80 "${TRACE}" | tee -a "${REPORT}"
149
+ else
150
+ trace "no ${TRACE}"
151
+ fi
152
+ section "kernel OOM / kill hints"
153
+ dmesg -T 2>/dev/null | grep -iE 'oom|killed process|out of memory' | tail -20 | tee -a "${REPORT}" \
154
+ || journalctl -k -b --no-pager 2>/dev/null | grep -iE 'oom|killed process|out of memory' | tail -20 | tee -a "${REPORT}" \
155
+ || trace "(no dmesg/journal access)"
156
+ trace "Done. Report: ${REPORT}"
157
+ }
158
+
159
+ run_install() {
160
+ section "traced install via omarchy-galaaz-add arrow-ruby"
161
+ trace "If the terminal dies, re-open a terminal and run:"
162
+ trace " omarchy-galaaz-arrow-debug last-log"
163
+ trace " omarchy-galaaz-arrow-debug status"
164
+ local add="${HOME}/.local/bin/omarchy-galaaz-add"
165
+ if [[ ! -x "${add}" ]]; then
166
+ add="$(command -v omarchy-galaaz-add || true)"
167
+ fi
168
+ if [[ -z "${add}" || ! -x "${add}" ]]; then
169
+ trace "ERROR: omarchy-galaaz-add missing — run: galaaz omarchy install"
170
+ return 1
171
+ fi
172
+ # Clear stale markers so menu/add can redo Arrow (Ruby).
173
+ for m in arrow arrow-ruby; do
174
+ if [[ -f "${HOME}/.config/galaaz/profiles/${m}" ]]; then
175
+ trace "removing incomplete/stale profiles/${m}"
176
+ rm -f "${HOME}/.config/galaaz/profiles/${m}"
177
+ fi
178
+ done
179
+ export GALAAZ_ARROW_TRACE=1
180
+ export GALAAZ_ARROW_GLIB_JOBS="${GALAAZ_ARROW_GLIB_JOBS:-1}"
181
+ trace "exec: GALAAZ_ARROW_TRACE=1 GALAAZ_ARROW_GLIB_JOBS=${GALAAZ_ARROW_GLIB_JOBS} ${add} arrow-ruby"
182
+ sync
183
+ "${add}" arrow-ruby
184
+ }
185
+
186
+ pause_end() {
187
+ local st=$1
188
+ echo
189
+ echo "Report: ${REPORT}"
190
+ if [[ "${st}" -ne 0 ]]; then
191
+ echo "FAILED (exit ${st}). Press Enter to close."
192
+ else
193
+ echo "OK. Press Enter to close."
194
+ fi
195
+ read -r _ || true
196
+ exit "${st}"
197
+ }
198
+
199
+ case "${CMD}" in
200
+ -h|--help|help)
201
+ sed -n '1,20p' "$0"
202
+ exit 0
203
+ ;;
204
+ status|probe)
205
+ run_status
206
+ pause_end 0
207
+ ;;
208
+ last-log|logs)
209
+ : >>"${REPORT}"
210
+ run_last_log
211
+ pause_end 0
212
+ ;;
213
+ install|add)
214
+ run_status
215
+ run_install
216
+ st=$?
217
+ run_status
218
+ pause_end "${st}"
219
+ ;;
220
+ *)
221
+ echo "Unknown command: ${CMD}"
222
+ echo "Use: status | last-log | install"
223
+ pause_end 1
224
+ ;;
225
+ esac
@@ -56,11 +56,14 @@ After: galaaz add knit (Install → Development → Galaaz → Knit)
56
56
  Or from the menu: Knit demo (oh_my)
57
57
 
58
58
  Other add-ons
59
- galaaz add arrow # Apache Arrow
60
- galaaz add ledger # R-on-Rails demo app ~/r_on_rails_ledger && bin/dev
61
- galaaz add examples # Ruby examples → ~/galaaz-examples
62
- galaaz add tex # TinyTeX / PDF (large)
63
- galaaz add bio # Bioconductor DESeq2 (large)
59
+ galaaz add arrow-r # Arrow (R only) — CRAN arrow / Apache prebuilt
60
+ galaaz add arrow-ruby # Arrow (Ruby) installs R only first, then red-arrow
61
+ galaaz add ledger # R-on-Rails demo app → ~/r_on_rails_ledger && bin/dev
62
+ galaaz add examples # Ruby examples ~/galaaz-examples
63
+ # ruby ~/galaaz-examples/misc/ggplot.rb
64
+ # less ~/galaaz-examples/README.md
65
+ galaaz add tex # TinyTeX / PDF (large)
66
+ galaaz add bio # Bioconductor DESeq2 (large)
64
67
 
65
68
  Check: galaaz doctor
66
69
  Menu: Super+Space → Install → Development → Galaaz
@@ -316,6 +316,11 @@ if [[ -f "${SCRIPT_DIR}/galaaz-gknit.sh" ]]; then
316
316
  chmod +x "${HOME}/.local/bin/omarchy-galaaz-gknit"
317
317
  log "gknit helper: ${HOME}/.local/bin/omarchy-galaaz-gknit"
318
318
  fi
319
+ if [[ -f "${SCRIPT_DIR}/galaaz-arrow-debug.sh" ]]; then
320
+ cp "${SCRIPT_DIR}/galaaz-arrow-debug.sh" "${HOME}/.local/bin/omarchy-galaaz-arrow-debug"
321
+ chmod +x "${HOME}/.local/bin/omarchy-galaaz-arrow-debug"
322
+ log "arrow debug: ${HOME}/.local/bin/omarchy-galaaz-arrow-debug"
323
+ fi
319
324
 
320
325
  # Nautilus right-click → Scripts → Galaaz → gknit
321
326
  NAUTILUS_SCRIPTS_SRC="${SCRIPT_DIR}/nautilus-scripts"
@@ -54,12 +54,28 @@
54
54
  "action": "omarchy-launch-tui omarchy-galaaz-add knit",
55
55
  "disabled": "test -f ~/.config/galaaz/profiles/knit"
56
56
  },
57
- "install.development.galaaz.arrow": {
57
+ "install.development.galaaz.arrow-r": {
58
58
  "icon": "\uE90E",
59
59
  "iconFont": "omarchy",
60
- "label": "Arrow",
61
- "action": "omarchy-launch-tui omarchy-galaaz-add arrow",
62
- "disabled": "test -f ~/.config/galaaz/profiles/arrow"
60
+ "label": "Arrow (R only)",
61
+ "description": "CRAN arrow via Apache prebuilt libarrow",
62
+ "action": "omarchy-launch-tui omarchy-galaaz-add arrow-r",
63
+ "disabled": "test -f ~/.config/galaaz/profiles/arrow-r -o -f ~/.config/galaaz/profiles/arrow"
64
+ },
65
+ "install.development.galaaz.arrow-ruby": {
66
+ "icon": "\uE90E",
67
+ "iconFont": "omarchy",
68
+ "label": "Arrow (Ruby)",
69
+ "description": "R arrow + arrow-glib / red-arrow (installs R only first)",
70
+ "action": "omarchy-launch-tui omarchy-galaaz-add arrow-ruby",
71
+ "disabled": "test -f ~/.config/galaaz/profiles/arrow-ruby -o -f ~/.config/galaaz/profiles/arrow"
72
+ },
73
+ "install.development.galaaz.arrow-debug": {
74
+ "icon": "\uE90E",
75
+ "iconFont": "omarchy",
76
+ "label": "Arrow debug",
77
+ "description": "Diagnose R-only / Ruby Arrow; show logs if install crashed",
78
+ "action": "omarchy-launch-tui omarchy-galaaz-arrow-debug status"
63
79
  },
64
80
  "install.development.galaaz.bio": {
65
81
  "icon": "\uE90E",
data/version.rb CHANGED
@@ -1,2 +1,2 @@
1
1
  $gem_name = "galaaz"
2
- $version="2.1.10.pre.8"
2
+ $version="2.1.10.pre.10"
metadata CHANGED
@@ -1,13 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: galaaz
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.10.pre.8
4
+ version: 2.1.10.pre.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo Botafogo
8
+ autorequire:
8
9
  bindir: bin
9
10
  cert_chain: []
10
- date: 2026-09-09 00:00:00.000000000 Z
11
+ date: 2026-09-10 00:00:00.000000000 Z
11
12
  dependencies:
12
13
  - !ruby/object:Gem::Dependency
13
14
  name: msgpack
@@ -86,11 +87,11 @@ description: |
86
87
  email: rodrigo.a.botafogo@gmail.com
87
88
  executables:
88
89
  - galaaz
89
- - gbookdown
90
+ - gstudio
90
91
  - gknit
91
- - gknit-draft
92
+ - gbookdown
92
93
  - grun
93
- - gstudio
94
+ - gknit-draft
94
95
  extensions: []
95
96
  extra_rdoc_files: []
96
97
  files:
@@ -250,6 +251,7 @@ files:
250
251
  - examples/Bibliography/stats.bib
251
252
  - examples/R/calc.R
252
253
  - examples/R/java_interop.R
254
+ - examples/README.md
253
255
  - examples/bioconductor_deseq2_airway/Documentation/DESeq2-airway-walkthrough.md
254
256
  - examples/bioconductor_deseq2_airway/bench_galaaz_three_same_process.rb
255
257
  - examples/bioconductor_deseq2_airway/bench_r_three_same_process.R
@@ -446,6 +448,7 @@ files:
446
448
  - script/omarchy/fonts/galaaz.ttf
447
449
  - script/omarchy/fonts/omarchy-with-galaaz.ttf
448
450
  - script/omarchy/galaaz-add.sh
451
+ - script/omarchy/galaaz-arrow-debug.sh
449
452
  - script/omarchy/galaaz-gknit.sh
450
453
  - script/omarchy/galaaz-guide.sh
451
454
  - script/omarchy/install-galaaz.sh
@@ -548,6 +551,7 @@ metadata:
548
551
  documentation_uri: https://rbotafogo.github.io/galaaz/
549
552
  changelog_uri: https://github.com/rbotafogo/galaaz/blob/galaaz2_0/CHANGELOG.md
550
553
  yard.run: yri
554
+ post_install_message:
551
555
  rdoc_options: []
552
556
  require_paths:
553
557
  - lib
@@ -562,7 +566,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
562
566
  - !ruby/object:Gem::Version
563
567
  version: '0'
564
568
  requirements: []
565
- rubygems_version: 4.0.3
569
+ rubygems_version: 3.5.22
570
+ signing_key:
566
571
  specification_version: 4
567
572
  summary: 'R-on-Rails: tightly couple Ruby and GNU R for data science on the web'
568
573
  test_files: []