Commit Graph

10 Commits

Author SHA1 Message Date
ExPikaPaka
2f67e46047 fix(codegen): drop grpcio-tools, stop committing generated code
The codegen only ever needed a protoc binary, but every entry point installed
grpcio-tools to get one. That drags in the grpcio C extension, which has no
Windows/ARM64 wheel and falls back to building from source there, so the ARM64
job died with "Failed building wheel for grpcio" -> "protoc not found".

tools/codegen_toolchain.py resolves the toolchain instead: protoc from $PROTOC,
PATH, a cache, grpc_tools when already installed, or a pinned checksum-verified
protoc release unpacked into .codegen-tools/; protobuf and pyyaml from the
calling interpreter or a cached virtualenv it re-execs into (distro Pythons
refuse `pip install` under PEP 668). All four build scripts and all three CI
jobs are now just `python tools/run_codegen.py`, with no pip lines around it.

tools/config_metadata_pb2.py was the one generated file checked into git. The
orca.* option extensions are now read out of the descriptor set, which already
carries config_metadata.proto via --include_imports, so nothing is generated
into the tree -- and the protobuf>=6.33.5,<7 CI pin goes away with it, since it
only existed to satisfy gencode's hard ValidateProtobufRuntimeVersion check.
Generated C++ verified byte-identical under upb and the pure-Python protobuf
runtime (what win/arm64 installs), and under both grpc_tools' and standalone
protoc.

Also fixed:
- build_release_macos.sh still passed -DPython3_EXECUTABLE=<codegen venv>,
  pointing the bundled *embed* interpreter at the codegen environment -- the
  same confusion fae4b124 fixed on the CMake side.
- Tab.cpp #includes TabLayout_generated.cpp but had no dependency on
  codegen_config, so an incremental build after a .proto edit could compile it
  while the file was being rewritten. libslic3r already had this guard.
- ConfigCodegen.cmake now probes with `codegen_toolchain.py --check` (which
  never downloads or installs), prefers a host interpreter over the embed one,
  and lets a fresh clone generate at configure time instead of erroring out.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-28 12:53:05 +02:00
ExPikaPaka
571819bfb2 Merge origin/main into feature/protobuf_config_and_dynamic_ui
Resolve the 4 proto-refactored conflicts (Preset.cpp, Print.cpp,
PrintConfig.cpp, Tab.cpp) by keeping the branch's generated-include
versions; auto-merged non-conflict changes from main are preserved.

Reconcile main's new settings into the proto schema. main added 52 new
active init_fff_params settings not present in the proto; ported them all
(type/label/tooltip/default/enum/preset) into print/filament/printer.proto
so the config registers, profiles load, and the GUI does not crash on
missing defs. Added GuiType.plugin_picker to config_metadata.proto and
regenerated config_metadata_pb2.py.

Codegen: run_codegen validate PASSED (712 fields). UI layout (layout.yaml
placement) for the 52 new settings is a follow-up; they are registered and
serialized but not yet placed in GUI tabs.
2026-07-28 08:01:22 +02:00
ExPikaPaka
1c576873fc Merge remote-tracking branch 'origin/main' into feature/protobuf_config_and_dynamic_ui
Reconcile main's config changes with the protobuf codegen:
- New settings ported to proto schema (already present) and verified in
  generated PrintConfigDef/Preset_options/TabLayout + PrintConfig.hpp:
  small_support_perimeter_speed, small_support_perimeter_threshold,
  top_layer_direction, bottom_layer_direction, hole_to_polyhole_max_edges
- Ported main's label/tooltip updates for adaptive_pressure_advance_overhangs
  and adaptive_pressure_advance_bridges into filament.proto (were dropped in
  the conflict resolution) and regenerated.
- Kept main's non-generated logic (Preset.cpp nullable filament override
  force-emit).

Codegen validated (python tools/run_codegen.py --validate-only): PASSED.
2026-07-08 10:31:10 +02:00
ExPikaPaka
cd6223ffaf Make typo verification more robust 2026-06-18 08:48:42 +02:00
ExPikaPaka
972da86fbc Fix incorrect path at codegen config 2026-06-04 09:08:27 +02:00
ExPikaPaka
3db76d7f89 Extend code generators to properly handle new data types 2026-06-04 08:40:20 +02:00
Mykola Nahirnyi
35d4bae778 Add codegen pipeline 2026-05-27 09:57:24 +03:00
SoftFever
e23e71bec5 restore tools to git from lfs 2024-03-17 23:14:43 +08:00
SoftFever
2efba59b0d add win tools 2024-03-11 14:22:17 +08:00
SoftFever
6962cd6577 upgrade deps (#2349)
* upgrade deps
2023-10-09 00:19:26 +08:00