53 Commits
Author SHA1 Message Date
adminandGitHub 095a29a4a0 Centralize Shardok C++ standard settings (#8197) 2026-06-26 07:28:26 -07:00
adminandGitHub c06a5a9533 Prepare Bazel build files for native load cleanup (#7062) 2026-06-11 06:45:47 -07:00
adminandGitHub e543d7b53f Run scalafmt hook through Bazel (#6753) 2026-05-24 13:01:56 -07:00
a1391cdad2 Add missing Unity .meta files and import artifacts (#6481)
* Add missing Unity .meta files, HoneyBadger import artifacts, and fix_import.py

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Remove HoneyBadger import artifacts and gitignore FBX auto-generated files

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 09:21:22 -07:00
9aec075f51 Add smooth_boundaries.py for natural province boundary smoothing (#6382)
* Add smooth_boundaries.py for natural province boundary smoothing

Post-processing tool for rawGray.gz.bytes that replaces jagged
province boundaries with smooth, natural-looking ones using:
1. Majority-filter smoothing (iterative mode filter on boundary pixels)
2. Fragment cleanup (BFS expansion preserving ocean-separated islands)
3. Domain warping (Gaussian displacement for organic character)

Includes automated verification (province preservation, neighbor
adjacency, connectivity) and before/after visualization output.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Apply boundary smoothing to province map

Run smooth_boundaries.py --seed 42 to smooth jagged province boundaries.
Uses pixel-based adjacency instead of TSV for neighbor verification.
Updates centroids.json with new label positions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Add targeted boundary smoothing for West Faluria borders

Adds --targeted-smooth mode to smooth_boundaries.py that applies a
bilateral majority filter to specific province border pairs. Smooths
the 40-37 (West Faluria/Yuetia) and 40-11 (West Faluria/Garholtia)
boundaries to reduce bubble protrusions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Redraw West Faluria borders via manual edit with roughened edges

Hand-edited province boundaries for West Faluria (40) expanding into
Usvol (33) and Hofolen (17), then applied localized domain warp to
roughen the new borders for a natural look. Added rawgray_editor.py
for PNG export/import workflow and roughen_borders.py for localized
border roughening.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 12:05:18 -08:00
f5ed0de040 Improve label positioning with clearance-threshold algorithm (#6187) (#6191)
Replace Gaussian-weighted blend with simpler, more predictable approach:
find all pixels with >= 70% of max possible edge clearance, then pick the
one closest to the geometric centroid. This keeps labels well inside province
boundaries while staying visually centered. Most labels barely move from
their current positions; labels near narrow borders (Kezonoria, Grytrand)
get nudged further inside.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 17:56:28 -08:00
9c557873c4 Fix province label positions using pole-of-inaccessibility algorithm (#6188)
Replace geometric centroid (mean of pixels) with a distance-transform-based
approach that finds the point inside each province maximally distant from
edges, weighted by proximity to the visual center. This fixes labels that
bled into neighboring provinces or extended over water (Berkorszag, Chia,
Pozia).

Also adds --update-centroids mode to generate_map.py for re-running label
positioning without losing hand-tuned styling fields.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 14:16:17 -08:00
64a15dd616 Smooth province borders and reduce default width (#6174)
* Smooth province borders and reduce default border width

Switch distance-to-border computation from Chebyshev (L∞) to Chamfer
(Euclidean approximation) using √2 diagonal weights, producing smooth
circular contours instead of blocky square stepping. Enable bilinear
texture filtering for additional sub-texel smoothing. Reduce default
border width from 2.0 to 1.5 texels for a cleaner look.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Reduce default border width to 0.75 texels

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Make default borders much thinner (account for double-sided drawing)

Both provinces on each side of a boundary draw their own border, so the
visual width is ~2x the configured value. Reduce width to 0.35 texels
(~0.7 total) and tighten the AA ramp from 0.75 to 0.5 for a true
hairline border.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix border width: update serialized scene value to 0.35

The scene's serialized defaultBorderWidth (2.0) was overriding the C#
default at runtime via Awake(). Update the Gameplay.unity scene to match.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Warp province boundaries for organic look

Apply domain warping to rawGray.gz.bytes using Gaussian-filtered noise
displacement fields. Only land pixels near province boundaries are
affected; ocean and coastline pixels are preserved. Adds a reusable
warp_boundaries.py script with configurable amplitude, scale, and seed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 19:01:22 -08:00
b91113039f Map adjustments: connect Chia island, thicken peninsula, fix Pozia (#5989)
- Chia: Connected the large island to the main peninsula via land bridge
- Chia: Thickened the peninsula by 15 pixels to better fit province label
- Pozia: Assigned 199 previously uncolored pixels in southeast region

- Regenerated map_borders.png (borders only, transparent elsewhere)
- Updated centroids.json with recalculated province centroids
- Added edit_provinces.py tool for province map editing

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-11 13:41:08 -08:00
64c86ebd2b Add Rust map generator, equalized province maps, and dynamic province labels (#5957)
* Add design doc for programmatic map image generation

Documents the plan to:
- Create a Python tool for regenerating map images with more equalized province sizes
- Implement dynamic province name rendering that scales with zoom
- Preserve topology and neighbor relationships while enlarging small provinces

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add Python map generator tool for province size equalization

Implements Part 1 of the programmatic map generation plan:
- Python script using weighted dilation to grow small provinces
- Preserves jagged/natural edges using noise fields
- Allows small provinces to claim limited ocean pixels (20% max)
- Maintains neighbor relationships and realistic coastlines

Results:
- Province size ratio reduced from 110x to 22x
- Smallest province (Kojaria) grew 5x (3,262 → 16,590 pixels)
- All 43 province masks and centroids.json generated

Usage:
  cd tools/map_generator
  python -m venv venv && source venv/bin/activate
  pip install -r requirements.txt
  python generate_map.py --generate

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add ProvinceLabelsController for dynamic map labels

Part 2 of programmatic map generation - dynamic province name rendering:
- Creates TextMeshPro labels at province centroids
- Labels scale inversely with zoom level for readability
- Only visible when zoom >= 1.5x (configurable)
- Font size scales with province area for visual hierarchy
- Includes centroids.json with province positions

To use:
1. Add ProvinceLabelsController component to a GameObject in the scene
2. Assign zoomHandler, mapContent (RectTransform), and centroidsJson TextAsset
3. Optionally configure font, colors, and zoom threshold

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add topology documentation and tendril removal to map generator

- Document new province adjacencies caused by equalization
- Add priority_provinces parameter for boosting specific province growth
- Add remove_tendrils() post-processing to eliminate thin extensions
- Note: Will be restructured to use Bazel in next commit

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add Bazel Python support and parallelized map generator

- Add rules_python to MODULE.bazel with Python 3.13
- Move map generator to src/main/python/net/eagle0/eagle/
- Add parallel processing using ProcessPoolExecutor
- Provinces are now grown in parallel across multiple CPU cores

Usage:
  bazel run //src/main/python/net/eagle0/eagle:map_generator -- --generate
  bazel run //src/main/python/net/eagle0/eagle:map_generator -- --workers 8

The old tools/map_generator/ script remains for reference but the Bazel
version is now the primary implementation.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add Rust map generator and equalized province maps

- Add Rust map generator (src/main/rust/net/eagle0/eagle/map_generator/)
  - Uses parallel graph coloring for non-adjacent province processing
  - Generates equalized province sizes (smallest ~7x larger than before)
  - Outputs: rawGray.gz.bytes, map_bw.png, province masks, centroids.json
  - Run with: bazel run //src/main/rust/net/eagle0/eagle/map_generator -- --generate

- Update province_map.tsv with neighbor changes from equalization:
  - Usvol gains: Laufarvia, Hella, Grytrand
  - Chapellia loses Nikemi, gains Kojaria
  - Kojaria gains Motcia, Chapellia
  - Motcia gains Kojaria

- Update Unity assets with equalized map:
  - New rawGray.gz.bytes with equalized province boundaries
  - New map_bw.png with textured water, transparent land, dark borders
  - Updated province mask images (1-43.png)
  - Updated centroids.json with orientation data for label rotation

- Update ProvinceLabelsController.cs to support label rotation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix coordinate system for rawGray and province labels

- Fix save_raw_gray to not flip Y coordinates (was causing click detection
  to be inverted)
- Fix ProvinceLabelsController to not flip Y coordinates (was causing
  labels to appear in wrong positions)
- Update rawGray.gz.bytes with correct orientation
- Update Gameplay.unity with ProvinceLabelsController setup

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Improve province label rendering

- Reduce max font size scale from 2.0 to 1.3
- Disable word wrapping, allow text overflow
- Fix orientation sign (remove negation)
- Allow near-vertical labels by expanding angle range to [-90, 90]
- Recalculate province orientations with new range

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Scale province label font size based on province dimensions

- Add principal_length and perpendicular_width to centroids.json
- Update ProvinceLabelsController to scale font based on principal_length
- Update Rust map generator to calculate province dimensions via PCA
  eigenvalues (4 * sqrt(eigenvalue) for ±2 std dev coverage)
- Disable text wrapping on labels to prevent unwanted line breaks

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Reduce province label base font size to 11

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Update neighbor positions and hex map starting positions for new borders

TSV changes (neighborPositions for new neighbors):
- Laufarvia: Usvol attacks from dir 4 (E)
- Hella: Usvol attacks from dir 2 (NE)
- Chapellia: Kojaria attacks from dir 4 (E)
- Usvol: Laufarvia=3(W), Hella=5(SW), Grytrand=4(E)
- Kojaria: Chapellia=1(N), Motcia=3(W)
- Grytrand: Usvol attacks from dir 3 (W)

Hex map changes (new attackerStartingPositions):
- Motcia.e0mj: Added direction 0 (NW) for Kojaria
- Chapellia.e0mj: Added direction 4 (SE) for Kojaria
- Kojaria.e0mj: Added directions 1 (N) and 3 (E) for Chapellia/Motcia

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Revert outline width change (made text smaller)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add TMP underlay effect for better label visibility on dark backgrounds

The underlay expands outward (unlike outline which shrinks text inward),
providing a white glow around labels without reducing text size.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-10 14:30:58 -08:00
a7b7b0e444 Upgrade Scala 3.7.4, rules_scala 7.1.5, protobuf 33.0, grpc 1.76.0, Bazel 7.7.1 (#5871)
* Upgrade rules_scala 7.1.5, Scala 3.7.4, protobuf 32.1

- Update rules_scala from 7.1.1 to 7.1.5
- Update Scala from 3.7.2 to 3.7.4
- Update protobuf from 29.2 to 32.1 (required by rules_scala 7.1.5+)
- Add force_version for Maven dependency conflicts (gson, errorprone, guava)
- Update -Wconf pattern in tools/BUILD.bazel for Bazel 7/8 compatibility
- Add -Wno-deprecated-copy-with-dtor to suppress protobuf 32.x warning

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add grpc 1.76.0, protobuf 33.0, and Bazel 7.7.1 compatibility fixes

- Upgrade grpc from 1.71.0 to 1.76.0.bcr.1 (required for protobuf 33.0)
- Upgrade protobuf from 32.1 to 33.0 (matches grpc 1.76.0 expectations)
- Upgrade Bazel from 7.6.1 to 7.7.1
- Add single_version_override for rules_swift 3.1.2 (grpc needs 3.x, rules_apple needs 2.x)
- Add --features=-module_maps workaround for grpc cf_event_engine macOS build issue

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 17:01:15 -08:00
af5fb35731 Remove non-local returns and -Wconf suppression (#5789)
* Remove non-local returns and -Wconf suppression

Refactor code to avoid non-local returns (using `return` inside closures)
which are deprecated in Scala 3. Changes:

- OAuthService.scala: Replace early returns with if/else patterns in
  exchangeCodeForToken, fetchUserInfo, generateAppleClientSecret,
  exchangeAppleCode, and parseAppleIdToken methods
- PerformProvinceEventsAction.scala: Replace for-loop with early return
  with foldLeft pattern in beastType method

Remove the `msg=Non local returns:silent` suppression from the toolchain.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix non-local returns in MapValidationTest

Refactor checkMonthlyWeather to use exists() instead of foreach with
early returns. Also fixes typo in error message (was "> 0" should be "> 100").

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 21:32:54 -08:00
660ee12afc Remove unnecessary -Wconf suppression for 'this' qualifier warnings (#5787)
This suppression was not needed - there are no warnings of this type
in the codebase.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 21:11:45 -08:00
3af3c29630 Replace deprecated _ wildcard syntax with ? in type arguments (#5786)
Scala 3 deprecates `_` for wildcard type arguments in favor of `?`.
This fixes the one occurrence in CommandChoiceHelpers.scala and removes
the -Wconf suppression for this warning.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 16:54:25 -08:00
09280e2e70 Enable -Werror and fix all Scala compiler warnings (#5783)
* Enable -Werror and fix compiler warnings (partial)

This commit enables -Werror in the Scala toolchain and fixes warnings
in the main server code and several test files. Main changes:

Server code fixes:
- Remove unused imports (HeroId, ActionResult, unused, Try)
- Remove unused parameters (playerCount cascade in NewGameCreation,
  persister in synchronizedCreateGame, userServiceForGames in buildServer)
- Fix discarded value warnings with explicit : Unit type ascriptions
- Fix pattern match warning by removing unnecessary type annotation

Test code fixes:
- Remove unused imports across multiple test files
- Remove unused default parameter values that are always explicitly passed
- Fix ScalaMock expectation setup warnings with : Unit
- Fix MapValidationTest to properly combine boolean checks
- Fix loneElement usage to use proper assertions

The -Werror flag is now enabled along with -Wconf suppressions for:
- Initialization warnings (safe patterns Scala 3 warns about)
- ScalaTest assertion return values
- External/generated sources

Many test files still have warnings that need to be fixed in follow-up
commits before all 315 tests will build with -Werror.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Remove unused heroes variable in ReturningHeroesTest

Fix CI failure caused by unused private member warning.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix Scala compiler warnings in test files for -Werror compatibility

- Remove unused imports across multiple test files
- Remove unused private members and default parameters
- Add `: Unit` type ascription to ScalaMock expectations to silence discarded value warnings
- Fix deprecated `<function> _` syntax by removing trailing ` _`
- Replace deprecated `= _` with `scala.compiletime.uninitialized`
- Add `val _ =` to explicitly discard unused return values

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix remaining Scala compiler warnings in main sources for -Werror

- Remove unused imports: JString in OpenAIResponsesServiceImpl, FactionId in
  DiplomacyOptionConverter and RansomOfferDetailsConverter,
  OpenAIChatCompletionsServiceImpl in HeroLibraryGenerator
- Replace deprecated `= _` with `= uninitialized` in SseSubscriber and
  ShardokInstanceManager
- Remove unused private member MessageType in SseSubscriber
- Remove unused private member openAICaller in HeroLibraryGenerator
- Add missing pattern match cases: UNKNOWN_UNIT in UnitStatusConverter,
  Gender.Unknown in HeroLibraryGenerator
- Fix discarded value warnings with `val _ =` in ShardokInstanceManager
- Fix unused pattern variables in NameListChecker

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 16:28:25 -08:00
adminandGitHub 44e90aaed2 Fix compiler warnings across codebase for -Werror preparation (#5782) 2026-02-02 08:46:54 -08:00
813a1a05c3 Enable -Wall and fix compiler warnings for Scala 3 (#5767)
This is a stepping stone toward enabling -Werror for exhaustiveness checking
on sealed traits. Changes include:

- Enable -Wall in Scala toolchain configuration
- Add -Wconf suppressions for generated code and external dependencies
- Fix discarded value warnings by explicitly discarding with `val _ =`
- Fix non-local return warnings in JwtService using nested if/else
- Fix deprecated `= _` syntax using `= uninitialized` in OAuthHttpHandler
- Fix implicit parameter syntax: `(ec)` -> `(using ec)` in GrpcRetrier
- Remove unused imports across multiple files
- Add @unused annotation for intentionally unused parameters
- Fix wrong imports in SettingUpdater (was using wrong proto package)
- Fix BUILD.bazel exports to make GrpcRetrier available transitively
- BUG FIX: StringConstructionParser was silently ignoring parse errors
  when closing character wasn't found (added missing return)

Note: -Werror is not yet enabled (TODO in tools/BUILD.bazel) because
there are still unused import warnings in some files. Once those are
fixed, -Werror can be uncommented to get compile-time exhaustiveness
checking.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 15:08:00 -08:00
91553a0eec Fix installer manifest public key injection (#5537)
The manifest public key wasn't being injected properly because:
1. Workspace status variables need STABLE_ prefix for x_defs stamping
2. BUILD.bazel was using {MANIFEST_PUBLIC_KEY} but the variable
   wasn't being output with the STABLE_ prefix

This caused the installer to try to base64 decode the literal string
"{MANIFEST_PUBLIC_KEY}" instead of the actual public key value.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 20:29:25 -08:00
1f2bc115d0 Rewrite Windows installer in Go (73MB -> 5.4MB) (#5515)
* Rewrite Windows installer in Go (73MB -> 5.4MB)

Rewrites the Eagle0 Windows installer from C#/.NET to Go, reducing the
binary size from 73MB to 5.4MB (93% reduction).

The Go implementation provides the same functionality:
- Downloads and verifies game files via manifest
- Ed25519 signature verification for manifest
- SHA256 verification for all downloaded files
- Parallel downloads (8 concurrent slots)
- Self-update mechanism for installer updates
- Console-based progress output
- Invitation code support

Changes:
- Add Go installer source code (main.go, updater.go, config.go)
- Add Bazel BUILD file with Windows cross-compilation target
- Update CI workflow to build Go binary instead of .NET
- Add MANIFEST_PUBLIC_KEY to workspace status for build-time injection

The installer is cross-compiled for Windows from Mac using Bazel.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix CI permission error when copying installer output

Remove any existing installer-output directory before copying
to avoid permission denied errors from previous runs.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 13:41:32 -08:00
584ccbadcb Add ARM64 Linux build infrastructure for Shardok (#4990)
* Add ARM64 Linux build infrastructure for Shardok

Infrastructure to support cross-compiling Shardok for ARM64 Linux,
enabling deployment to Hetzner ARM instances (CAX41) for on-demand
compute.

Changes:
- Add linux_arm64 platform definition
- Add LLVM toolchain for ARM64 cross-compilation
- Add ARM64 sysroot placeholder (needs workflow run to populate)
- Add ARM64 busybox for container health checks
- Add Ubuntu 24.04 ARM64 base image
- Add Shardok ARM64 container image targets
- Update sysroot build workflow to support ARM64

Next steps:
1. Run "Build Linux Sysroot" workflow with architecture=arm64
2. Update MODULE.bazel with generated sysroot SHA
3. Build and push ARM64 container

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Update ARM64 sysroot SHA from workflow build

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix ARM64 container build issues

- Use linux/arm64/v8 platform string (rules_oci requires variant suffix)
- Remove busybox_layer_arm64 due to busybox.net SSL certificate issues
- Health checks can be added later using an alternative busybox source

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add GitHub Actions workflow for ARM64 Shardok build

Builds and pushes ARM64 container image to GitHub Container Registry
for deployment on Hetzner ARM instances (CAX41).

Triggered on:
- Push to main (when Shardok-related files change)
- Manual workflow_dispatch

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 15:08:51 -08:00
ddea05514c Add action JSON and build info to admin server (#4927)
- Add action_json, faction_name, and game_date fields to GameHistoryEntry proto
- Serialize ActionResult to JSON in EagleServiceImpl.getGameHistory()
- Display faction name and date columns in history table
- Show full JSON inline when clicking action rows (no separate AJAX call)
- Add build timestamp and git commit to admin header on all pages
- Create workspace_status.sh for Bazel build stamping
- Enable --stamp in .bazelrc

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 07:18:45 -08:00
b7ff76a38e Fix sysroot .so plugins and registry auth (#4784)
* Fix sysroot .so plugins and registry auth

- Exclude GCC plugin .so files from sysroot (Bazel can't handle them)
- Only copy GCC headers and static libs needed for cross-compilation
- Add tarball structure verification to build script
- Fix DO registry auth by setting DOCKER_CONFIG env var for Bazel

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add triple symlinks to sysroot for clang compatibility

Clang uses --target=x86_64-unknown-linux-gnu but Ubuntu's GCC uses
x86_64-linux-gnu (without "unknown"). This caused clang to fail to detect
the GCC installation and couldn't find C++ standard library headers.

Add symlinks in the sysroot:
- /usr/lib/gcc/x86_64-unknown-linux-gnu -> x86_64-linux-gnu
- /lib/x86_64-unknown-linux-gnu -> x86_64-linux-gnu
- /include/x86_64-unknown-linux-gnu -> x86_64-linux-gnu

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix sysroot tarball structure for toolchains_llvm

The tarball was wrapping contents in sysroot/ which caused double nesting
when extracted by the sysroot() repo rule. Changed to tar from inside the
sysroot directory so usr/, lib/, etc. are at the root of the archive.

Before: sysroot/usr/...
After: ./usr/... (or usr/...)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add libgcc_s.so symlink to sysroot

The linker looks for libgcc_s.so but Ubuntu only provides libgcc_s.so.1.
Added a symlink to make -lgcc_s work.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix sysroot for cross-compilation

1. Add ld-linux-x86-64.so.2 symlink in lib/ since libc.so linker script
   references /lib64/ld-linux-x86-64.so.2 as an absolute path

2. Change linkopt to host_linkopt in .bazelrc to avoid passing macOS-specific
   linker flags (-no_warn_duplicate_libraries) to Linux cross-compilation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Update sysroot to v3.4 with all required symlinks

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add missing includes for cross-compilation portability

These files relied on platform-specific transitive includes that work on
macOS but not on Linux. Added explicit includes for:
- <cstdint> for uint8_t, uint64_t
- <stdexcept> for std::out_of_range
- <cinttypes> for PRIu64 portable format specifier

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 13:02:35 -08:00
d0a63f1c61 Fix sysroot for cross-compilation (#4778)
Issues fixed:
1. Sysroot hosted on GitHub releases but repo is private, causing 404s
2. Sysroot missing GCC directories that clang needs to find libstdc++ headers

Changes:
- Add GCC installation directories to sysroot (clang uses these to locate C++ headers)
- Update workflow to upload sysroot to DO Spaces instead of GitHub releases
- Versioned sysroot paths (v2, v3, etc.) for easier updates

NOTE: After merging, run the "Build Linux Sysroot" workflow with version "v2",
then update MODULE.bazel with the sha256 from the workflow output.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 07:34:02 -08:00
844e2b0407 Add cross-compilation support for Shardok Docker builds (#4772)
* Add cross-compilation support for Shardok Docker builds

This enables building Shardok on the self-hosted Mac runner while
targeting Linux x86_64, avoiding the need for slow GitHub-hosted
Ubuntu runners.

Changes:
- Add Ubuntu 24.04 (Noble) sysroot generation scripts
- Add GitHub Actions workflow to build and release the sysroot
- Configure toolchains_llvm for cross-compilation with sysroot
- Update docker_build.yml to use cross-compilation
- Add linux_x86_64 platform definition

The sysroot contains libstdc++-13 which provides C++23 support
needed by the codebase.

To complete setup:
1. Run the "Build Linux Sysroot" workflow to create the sysroot
2. Update MODULE.bazel with the actual sha256 from the release

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Temporarily disable Shardok build until sysroot is ready

The cross-compilation sysroot needs to be built and uploaded before
Shardok can be built. Steps to re-enable:
1. Run "Build Linux Sysroot" workflow
2. Update sha256 in MODULE.bazel
3. Uncomment build-shardok job

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-12-23 06:58:23 -08:00
adminandGitHub b6d95be632 Re-enable "-feature" (#4372)
* re-enable -feature

* deprecation too

* remove the migration doc
2025-08-29 08:55:33 -07:00
adminandGitHub 678a3a1fbe Build with Scala 3 (#4363)
* getting there

* moar

* progress

* a few more dependency fixes

* a bit more is passing

* weird staging thing

* more fixes

* fix another

* fix another

* more fixes

* BattalionC constructor

* moar

* moar

* more

* try a regex, gulp

* fix a bunch

* another exception

* some more tests

* province converter

* fixed a few more

* this is actually making progress

* another dep

* more deps

* more deps

* more

* so slooow

* a few more

* remove an asInstanceOf

* moar

* server builds maybe

* different reflection

* hmm

* get exceptions

* missing deps

* a few more fixes

* moar tests

* a few more

* Moar test fixes

* almost there

* just reflection issues now

* Fix Scala 3 compatibility issues in UnrequestedTextHandlerTest

- Fix ScalaTest import for Scala 3 compatibility: use shouldBe and the from Matchers
- Resolve build error that was preventing all tests from passing

All 200 tests now pass successfully with Scala 3.

* remove reflectiveSelectable

* remove staging dependency

* upgrade migration doc
2025-08-29 08:42:56 -07:00
adminandGitHub 99c86e155c Scala3 Phase 1: enable Xsource=3 (#4362)
* migration plan

* enable Xsource 3 and start fixing issues

* compatibility errors

* FunctionalInterface

* fix tests too

* mark completed
2025-08-26 11:57:33 -07:00
adminandGitHub 18d69c5eeb Update rules_scala to 7.0.0 and move to bzlmod (#4358)
* just the basics

* try this

* update one dep and replace remaining io_bazel_rules_scala

* cleanup

* unused deps

* cleanup

* moar
2025-08-26 06:39:22 -07:00
e7c8a8e25d Rename rules_scala import from io_bazel_rules_scala to rules_scala (#4357)
* Rename rules_scala import from io_bazel_rules_scala to rules_scala

This PR renames the rules_scala import in the WORKSPACE file from the old
name 'io_bazel_rules_scala' to the new standard name 'rules_scala', while
maintaining backward compatibility through aliasing.

Changes:
- Updated WORKSPACE to use both names (primary: io_bazel_rules_scala, alias: rules_scala)
- Updated all BUILD files to use the consistent repository name
- Updated toolchain definitions to use io_bazel_rules_scala internally
- Added compiler warning suppression for external dependencies
- Fixed test dependencies that were using incorrect repository names

The build and test suite now pass successfully with this naming change.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* run gazelle

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-08-25 06:44:49 -07:00
adminandGitHub 06538f3493 update to C++23 (#4329) 2025-08-13 22:03:08 -07:00
adminandGitHub 3c8bd1d804 Re-enable another warning (#4321)
* re-enable another warning

* more fixes

* more fixes
2025-08-13 09:40:06 -07:00
adminandGitHub 21c11c9afb Yet more warnings (#4318)
* unused parameters

* more

* moar

* moar

* fix some test warnings

* fix some test warnings

* another

* another
2025-08-13 08:01:12 -07:00
adminandGitHub b12a7584a5 fix some warnings and add more copts (#4317)
* fix some warnings and add more copts

* more fixes

* fix more deprecations

* remove that

* cleanup

* cleanup

* a bit more
2025-08-13 07:08:12 -07:00
adminandGitHub 87fdaa1f91 Move grpc-java from being a maven dep to a BCR dep (#3878)
* try using base grpc java

* still no

* move grpc-java from being a maven dep to a BCR dep

* oops
2025-01-04 18:58:27 -08:00
adminandGitHub 66775543d5 Another grpc (#3738)
* update to grpc 1.67

* bad

* still fail

* update rules_scala

* update grpc to 1.67.1 (from 1.53.0)

* 1.69.0

* more going back

* more

* protobuf too

* guess I did need the scalapb changes too

* resolve a couple of dep differences

* update protobuf path for ignoring warnings

* suppress another warning in parallel_hashmap

* another explicit dep

* delete, don't comment out
2025-01-02 12:35:31 -08:00
adminandGitHub 2c99f13ffd fix build file ordering (#3816) 2024-11-30 07:17:38 -08:00
adminandGitHub b1183e5e08 Revert "Go support (#3807)" (#3810)
This reverts commit a740291b40.
2024-11-29 14:42:04 -08:00
adminandGitHub a740291b40 Go support (#3807)
* what are these changes for

* add Golang support and run gazelle

* add a go binary

* still trying

* builds without nogo
2024-11-29 09:25:22 -08:00
adminandGitHub f69ea29721 use the maven protobuf rather than the workspace protobuf (#3740) 2024-10-10 19:05:07 -07:00
adminandGitHub c0c0f96e25 update grpc and scalapb (#3693)
* with the unapply fixes

* a bunch of pattern match fixes

* fixed most of the failures

* it runs

* fix a couple of tests

* all tests build

* got some tests passing

* all tests passing

* dead code

* more comments

* another

* dead code

* a couple unnecessary ones

* cleanup

* remove guava dep
2024-09-14 08:35:16 -07:00
adminandGitHub 4a53fba799 Upgrade rules_scala to 6.2.0 (from an old git commit) (#2972)
* upgrade rules_scala but does not match

* more updates
2023-10-05 22:14:43 -07:00
adminandGitHub b47f91c294 rename ai/BUILD to ai/BUILD.bazel (#2755)
* rename ai/BUILD to ai/BUILD.bazel

* rename all BUILD to BUILD.bazel

* rename all BUILD to BUILD.bazel
2023-06-19 18:58:22 -07:00
adminandGitHub 64704e718b Enable some more warnings (#2556)
* add some more warnings and fix a bunch of code

* more warning fixes


Former-commit-id: 713bbd3591535920aafe49cc40d59150be2016e3
2023-04-03 17:33:01 -07:00
adminandGitHub 10c77c1b1c Turn on -Werror but disable for a couple of third-party reps (#2555)
* silence warnings in third-party tools but treat warnings as errors in first-party

* -Werror


Former-commit-id: c3cc0ae56e03c6ff4fd3a1d1220b8b633b975c78
2023-04-03 17:19:37 -07:00
adminandGitHub 66a41070ad add -Xsource:3 (#2406)
Former-commit-id: 81b5d07f70a394c4d8daa4d51d708bea562c2a9b
2022-12-11 21:30:43 -08:00
adminandGitHub 5514fa6110 turn on -Wall in COPTS (#2127)
* turn on Wall

* now


Former-commit-id: 129b2a730232696ec9964db5eace63d0c1e198c6
2022-10-02 11:10:50 -07:00
adminandGitHub ee292bbbee Bazel 5.1 (#2124)
* upgrade to bazel 5.1.1

* upgrade grpc to 1.49.1

* put std=c++20 into bazelrc, but move Werror into COPTS

* don't upgrade scala yet


Former-commit-id: afcd3fb717b68c7c03b249079f4e9af44a9ff519
2022-10-02 10:42:49 -07:00
adminandGitHub 92c5030b68 Move copts from bazelrc to an explicit COPTS flag (#1588)
* generate map info rule

* visibility

* move c++ version from bazelrc to COPTS

* cc_library in tests, too

* and in cc_test

* separate TEST_COPTS

* revert generate_map_info for now


Former-commit-id: cef3df560bc5c013fbf27bd49f58f2b2cf014b53
2022-04-16 16:10:47 -07:00
adminandGitHub c6b1ee0d95 add the discarded-non-unit warnings (#713)
* add the discarded-non-unit warnings

* add warnings for value-discard

* test warnings


Former-commit-id: 90c1a74dad76a441f53c19f94f2c6affa6d83507
2021-06-08 21:10:06 -07:00
adminandGitHub 331a9d3008 not working rules_unity3d (#212)
* start

* start building some unity3d rules

* different format

* try a real build

* allow files

* a single file

* hmmmore

* slow progress


Former-commit-id: 89d807be8ec80296c32b922e5493527b668aed74
2021-01-30 13:12:25 -08:00