Commit graph

75 commits

Author SHA1 Message Date
8c03f502db Remove dead kotlinx-nodejs dependency from web-map
Its only coordinate (org.jetbrains.kotlinx:kotlinx-nodejs:0.0.7) was
published to Bintray's "kotlinx" repository, which has been shut down
since 2021 - it's unresolvable from any repo configured here (Maven
Central, JitPack, Gradle Plugin Portal, or JetBrains Space all 404 it),
blocking configuration of the whole build whenever a task touched
web-map. Turns out nothing in web-map's source actually imports
kotlinx.nodejs.* - the one require() call nearby is webpack's own
bundler global, unrelated to this library. It was also duplicated next
to a second, redundant kotlinx-html line. Just deleting the dependency
is the correct fix, not re-hosting a defunct artifact.

Verified: `:modules:events-mod:build :modules:events-library:check`
now gets past configuration and all JVM-side tasks succeed (the JS
browser test target still needs a locally installed Chrome for Karma,
which is an unrelated environment requirement, not a dependency issue).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-12 15:46:04 +02:00
509832d26d Fix kxs-ts-gen-core dependency resolution and unblocked compile bugs
The version catalog pointed kxs-ts-gen-core at a JitPack coordinate
(com.github.adamko-dev.kotlinx-serialization-typescript-generator) that
no longer serves real artifacts there, despite JitPack's build-status
API still reporting it as built. The library is properly published to
Maven Central under dev.adamko.kxstsgen - a commented-out line with
that exact coordinate was already sitting in the catalog. Swapping to
it fixes dependency resolution for every module depending on
versions-platform (which previously blocked any Gradle task touching
events-library, including all of its tests).

That unblocked two more pre-existing, unrelated bugs that had never
been caught because this module never previously compiled:

- LuaJsonList<T> : List<T> by list triggered a longstanding Kotlin
  compiler bug (KT-3546, "accidental override" on generic toArray)
  specific to delegating java.util.List via `by`. Replaced with a
  hand-written Collection<T> implementation (no delegation codegen,
  no bug), which still satisfies Kotest's forOne/forAll inspectors -
  the only thing any code actually needs from it.
- The kxs-ts-gen Kotlin->TypeScript generator (kt2ts2.kt) still emitted
  the pre-2.0 bare `uint`/`int` names and no import statement, since it
  predates typed-factorio's move to virtual modules. Updated its
  primitive-type mappings to uint32/int32 and added the "factorio:runtime"
  import to its generated header, so the regenerated schema matches what
  the rest of events-mod now expects.

Verified via real Gradle tasks (not just manual tooling): events-library
compiles and all tests pass; events-mod's full build - Kotlin schema
generation, npm install, tstl compile, and info.json generation (with
factorio_version "2.0" and the space-exploration/Krastorio2 optional
dependencies) - succeeds end-to-end.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-12 15:40:33 +02:00
e296a9aa90 Fix compile errors surfaced by actually building against Factorio 2.0.77
typed-factorio 2.0.0+ stopped declaring types as ambient globals - they
now live in virtual modules ("factorio:runtime", "factorio:common",
"factorio:settings") and must be explicitly imported. Adds those imports
throughout events-mod. Also:

- Bumps typescript-to-lua 1.11.1 -> 1.25.2 and typescript 4.9 -> 5.4.2,
  since tstl pins an exact peer TypeScript version and typed-factorio
  3.x needs a newer one than 4.9 supports (a real compiler bug in
  TS 4.9 against the generated defines.segmented_unit_ai_state enum).
- Bumps the pinned isolated Node (14.19.1 -> 24.21.0), since
  typescript-to-lua 1.25.2 requires Node >=16.10.0.
- Renames bare uint/int -> uint32/int32 (import aliases), since the
  unsized aliases no longer exist.
- Drops OnEntityDestroyedEvent from an unused documentation-only union
  type - that event no longer exists in the 2.0 API.
- LuaEntityPrototype.max_health is now get_max_health() (quality-aware).
- Fixes a branded-type mismatch between our generated schema's
  ForceIndex and typed-factorio's own ForceIndex.

Verified by actually running tstl end-to-end (clean compile, Lua
emitted) after installing a real JDK and Node toolchain.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-12 15:27:50 +02:00
072d1a2845 Port events-mod to Factorio 2.0.77, declare SE/Krastorio 2 compatibility
Bumps the Factorio engine pin and typed-factorio (1.11.0 -> 3.36.0,
targeting 2.0.75) and fixes the resulting breaking API changes:
global -> storage, game.*_prototypes -> prototypes.*, game.table_to_json/
encode_string -> helpers.*, OnBuiltEntityEvent.created_entity -> .entity,
removed TileRead/ColorTable/MapPositionTable-style write-form aliases,
new CollisionMask shape, restructured settings-stage type imports, and
new defines.entity_status values (added to the Status enum, generated
schema, and EntityStatusRecord mapping). Also declares optional mod
dependencies on space-exploration and Krastorio2.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-12 15:06:30 +02:00
Adam
9f2b9cbd5c big ol' refactor of the Gradle Factorio Mod
- handle launching in multiple OSes
- specific tasks for specific mod operations
- extension object for settings
- ground work for multiple mods
2022-12-18 01:41:14 +01:00
Adam
fcb870072a version bumps 2022-12-06 00:23:52 +01:00
Adam
ce4df2081a bump versions: factorio, typed-factorio 2022-10-30 19:26:43 +01:00
Adam
5bb8cc789c add/update docs 2022-10-30 17:21:32 +01:00
Adam
aaca52a3e1 update kvision, kotlinx-cli, kotlinJsWrappers, kotest 2022-10-23 22:24:30 +02:00
Adam
7cd6c4a47a revert kotlinx serialization to 1.4.0 https://github.com/Kotlin/kotlinx.serialization/issues/2065 2022-10-18 19:46:21 +02:00
Adam
da7b4b6ad1 version bumps 2022-10-16 13:07:43 +02:00
Adam
579c9d1c1a versions bump 2022-10-04 23:00:09 +02:00
Adam
c01c19a8e2 kafka 3.2.3 2022-10-02 12:40:34 +02:00
Adam
105555bf6c Kotlin 1.7.20 2022-10-02 12:06:34 +02:00
Adam
16dc72ae71 version bumps (minor bumps) 2022-09-18 13:59:43 +02:00
Adam
873983f9a3 big ol' refactor to split up the events-server and events-processors 2022-09-13 17:56:57 +02:00
Adam
c8815726b1 start splitting up events-server 2022-09-11 00:48:16 +02:00
Adam
dadbcdd8d6 version bumps (scrimage, kotlinJsWrappers, ktor, hoplite, tstl, typed-factorio, typescript) 2022-09-10 10:13:48 +02:00
Adam
ece583e93c bump kvision, remove manual npm version settings (I think it's been fixed now) 2022-09-01 23:18:47 +02:00
Adam
4bc46f9753 progress towards multi-server handling
- bump some versions
- validate Factorio server ID & token
-
2022-08-28 19:37:49 +02:00
Adam
3821996eeb bump some versions (use Kotest in Maven Local b/c plugin isn't available on Sonatype snapshot)
add tile width/height (added in new version of Factorio)
2022-08-28 13:39:34 +02:00
Adam
c9ae17d418 bump versions (kafka, ktor, hoplite, simple-syslog, factorio, tstl, typed-factorio, kotka, gradle-node) and update code to compile 2022-08-13 12:05:17 +02:00
Adam
d9f5d6d46d UpdatePackageJson task is updated based on a json object, and move npm versions to libs.versions.toml 2022-08-13 11:59:30 +02:00
Adam
d006635e49 bump tstl, typed-factorio, ks-js-wrappers 2022-07-23 16:26:11 +02:00
Adam
e15a7651f4 bump kotlinx libs, and hoplite 2022-07-17 12:35:12 +02:00
Adam
b4f3fc87e5 bump kvision 2022-07-17 10:01:04 +02:00
Adam
a805d2ad63 bump kotlin 1.7.10 2022-07-12 22:40:03 +02:00
Adam
0e6a9880ff add k svg (maybe do resources in SVGs?) 2022-07-08 21:06:50 +02:00
Adam
5a304245f1 bump kvision, js wrappers. organise dependencies 2022-07-06 16:20:11 +02:00
Adam
90dc520d22 massive refactor to export entities (buildings and resources)
- minor version bumps
- new Factorio version
- use both prototype name and type to identify a prototype
- kxs-ts-gen: use BrandTyping, but exclude some identifiers
- kxs-ts-gen: manually create zip dist, so it can run after the project compiles
- mod: use typed-factorio strict types
- mod: refactor event handlers to be a little more consistent and object-oriented
2022-07-05 23:44:23 +02:00
Adam
c0c82e7c9c finish migrating to ktor!
- remove http4k
- renamed 'schema' subproject to 'library', because it contains more than just data models
- tiles are now hosted per factorio-server
- changed api base to `kafkatorio/data`
- tidied up some Gradle conf
- remove 'events-processor' subproject - I don't want to set up loads of microservices right now
2022-07-02 08:45:21 +02:00
Adam
8a90c4fb5e - start migrating tile-server to use Ktor
- start splitting up Kafka processor and tile-server to two subprojects
2022-07-01 13:14:32 +02:00
Adam
e9a4ee4c48 set up syslog docker parser (remove need for Kafka Pipe script) 2022-06-27 22:07:42 +02:00
Adam
e56ecb7d36 bump kvision, kt js wrappers 2022-06-20 23:59:35 +02:00
Adam
0398e2026d project version bump to 0.6.0, and bump kotest, tstl, typescript 2022-06-19 10:54:37 +02:00
Adam
33d31bfbdd version bumps. Kotlin 1.7 and yarn.lock and others 2022-06-19 10:20:48 +02:00
Adam
b15382660b bump some versions 2022-05-25 12:47:23 +02:00
Adam
c3ac4d0222 add ktor, kotlinx artifacts to libs.versions.toml 2022-05-21 12:45:37 +02:00
Adam
b6b874d8f7 add Gradle task to upload the mod to the portal, and some gradle fixes 2022-05-18 19:33:27 +02:00
Adam
697a00b443 bump kvision, kotlinx serialization, factorio, and a few others 2022-05-14 17:58:14 +02:00
Adam
ffe9bcb9a8 bump versions
- kotlinx js wrappers
- kotest

also fix kotest dependencies
2022-05-14 12:22:47 +02:00
Adam
a78ffb794a implement versions platform, tidy up and bump some dependencies 2022-05-01 09:42:14 +02:00
Adam
12a905e8da bump kotka-streams version 2022-04-24 18:54:11 +02:00
Adam
7e497ffd59 setup grafana, prometheus, jmx 2022-04-23 21:57:46 +02:00
Adam
2ba44229ca bump kotlin version 2022-04-20 22:56:51 +02:00
Adam
448dd4a5b8 try fixing dependabot alerts 2022-04-20 11:27:32 +02:00
Adam
1e0a35d9ca bump kvision 2022-04-20 10:18:54 +02:00
Adam
3fff57d46d biggest refactor ever...
- use kxs-ts-gen for TypeScript schemas
- update schema files, so they're tidier (no need for typescript-generator workarounds)
- version bumps (kotlin, gradle, tstl, factorio, kotest)
- improve kxs binary format (use okio)
- move schema files package ('events' wasn't needed)
- tidy up topic creation, naming. base it off classes, make util functions
2022-04-20 10:17:41 +02:00
Adam
3a10485ed4 bump some versions, pin some npm dependencies to satisfy GitHub depend-a-bot, remove protobuf (unused) 2022-03-12 22:00:58 +01:00
Adam
b8ba8b7c9e - tidy up groupMapChunks.kt
- add ticks to all Kafkatorio Packets
- add Kafka Streams test for groupMapChunks.kt
2022-03-12 16:42:24 +01:00