From 62f42a746580af0ebbb7bff0bbe6b20705d50b81 Mon Sep 17 00:00:00 2001 From: revol-xut Date: Mon, 13 Nov 2023 11:33:33 +0100 Subject: [PATCH] adding github ci and fixed couple of bugs --- .github/actions/environment/action.yaml | 37 + .github/workflows/ci.yaml | 57 ++ .github/workflows/sandbox.yaml | 52 - .gitignore | 2 +- Cargo.lock | 337 ++++--- Cargo.toml | 1 + defaults/HelloTS.lf | 5 + derivation.nix | 6 +- flake.lock | 30 +- flake.nix | 2 - src/args.rs | 12 +- src/backends/cmake.rs | 15 +- src/backends/lfc.rs | 13 +- src/backends/mod.rs | 40 +- src/backends/npm.rs | 143 +++ src/backends/pnpm.rs | 29 + src/main.rs | 1 + src/package/mod.rs | 70 +- src/util/command_line.rs | 5 +- src/util/errors.rs | 7 + test.sh | 11 - test/Lingo-Cpp.toml | 1231 ++--------------------- test/Lingo-LFC.toml | 360 +++++++ test/Lingo-TypeScript.toml | 1071 ++++++++++++++++++++ 24 files changed, 2093 insertions(+), 1444 deletions(-) create mode 100644 .github/actions/environment/action.yaml create mode 100644 .github/workflows/ci.yaml delete mode 100644 .github/workflows/sandbox.yaml create mode 100644 defaults/HelloTS.lf create mode 100644 src/backends/npm.rs create mode 100644 src/backends/pnpm.rs delete mode 100755 test.sh create mode 100644 test/Lingo-LFC.toml create mode 100644 test/Lingo-TypeScript.toml diff --git a/.github/actions/environment/action.yaml b/.github/actions/environment/action.yaml new file mode 100644 index 0000000..4e7f8d5 --- /dev/null +++ b/.github/actions/environment/action.yaml @@ -0,0 +1,37 @@ +name: Build toolchain +description: Installs Dependencies and Compiles Lingo + +runs: + using: "composite" + steps: + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + - uses: actions/setup-java@v3 + with: + distribution: temurin + java-version: 17 + - name: Integration Test + run: | + # setting java17 + ls -alh /usr/lib/jvm/ + # export JAVA_HOME=/usr/lib/jvm/java-17-temurin-amd64 + + # building lingo + cargo b --release + + # installing lingua-franca tests + git clone https://github.com/lf-lang/lingua-franca.git ./lingua-franca + + # installing lfc + curl -Ls https://install.lf-lang.org | bash -s nightly cli + export PATH="$HOME/.local/bin:$PATH" + + # going into lfc repo and checking out the vers + cd ./lingua-franca + git reset nightly + cd .. + + shell: bash diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..19df29c --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,57 @@ +on: + pull_request: + push: + branches: + - main + +name: Test Lingo +jobs: + cpp-test: + name: CPP Test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Setup + uses: ./.github/actions/environment + - name: Integration Test Cpp + run: | + # copying Lingo.toml + cp test/Lingo-Cpp.toml ./lingua-franca/test/Lingo.toml + + cd ./lingua-franca/test/ + ../../target/release/lingo build + + shell: bash + typescript-test: + name: TypeScript Test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Setup + uses: ./.github/actions/environment + - name: Integration Test TypeScript + run: | + # copying Lingo.toml + cp test/Lingo-TypeScript.toml ./lingua-franca/test/Lingo.toml + + cd ./lingua-franca/test/ + ../../target/release/lingo build + + shell: bash + lfc-test: + name: LFC Fallback Test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Setup + uses: ./.github/actions/environment + - name: Integration Test TypeScript + run: | + # copying Lingo.toml + cp test/Lingo-LFC.toml ./lingua-franca/test/Lingo.toml + + cd ./lingua-franca/test/ + ../../target/release/lingo build + + shell: bash + diff --git a/.github/workflows/sandbox.yaml b/.github/workflows/sandbox.yaml deleted file mode 100644 index ac07627..0000000 --- a/.github/workflows/sandbox.yaml +++ /dev/null @@ -1,52 +0,0 @@ -on: - pull_request: - push: - branches: - - master - -name: Sandbox -jobs: - check: - name: Sandbox - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - id: get-release - name: get-latest-release - uses: pozetroninc/github-action-get-latest-release@master - with: - repository: lf-lang/lingua-franca - - name: Integration Test - run: | - # uninstalling java11 and installing java17 - sudo apt remove openjdk-11-jre-headless - sudo apt remove temurin-11-jdk - sudo apt remove temurin-8-jdk - sudo apt install openjdk-17-jre-headless - - # setting java17 - export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64 - - # building lingo - cargo b --release - - # installing lingua-franca tests - git clone https://github.com/lf-lang/lingua-franca.git ./lf-test - - # installing lfc - curl -L0 https://github.com/lf-lang/lingua-franca/releases/download/v0.5.1/lf-cli-0.5.1-Linux-x86_64.tar.gz --output ./lf-release.tar.gz - tar -xvf ./lf-release.tar.gz - - # copying Lingo.toml - cp test/Lingo-Cpp.toml ./lf-test/test/Lingo.toml - - - cd ./lf-test/test/Cpp - ../../../target/release/lingo build --lfc ../../../lf-cli-0.5.1-Linux-x86_64/bin/lfc - shell: bash - diff --git a/.gitignore b/.gitignore index 22c1ee8..7c13221 100644 --- a/.gitignore +++ b/.gitignore @@ -19,4 +19,4 @@ sandbox/ build/ **/src-gen/ tmp/ -lf-test +lingua-franca diff --git a/Cargo.lock b/Cargo.lock index 81e28f0..4f02c11 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,39 +4,38 @@ version = 3 [[package]] name = "aho-corasick" -version = "1.0.2" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41" +checksum = "ea5d730647d4fadd988536d06fecce94b7b4f2a7efdae548f1cf4b63205518ab" dependencies = [ "memchr", ] [[package]] name = "anstream" -version = "0.3.2" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163" +checksum = "2ab91ebe16eb252986481c5b62f6098f3b698a45e34b5b98200cf20dd2484a44" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", - "is-terminal", "utf8parse", ] [[package]] name = "anstyle" -version = "1.0.1" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a30da5c5f2d5e72842e00bcb57657162cdabef0931f40e2deb9b4140440cecd" +checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" [[package]] name = "anstyle-parse" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333" +checksum = "317b9a89c1868f5ea6ff1d9539a69f45dffc21ce321ac1fd1160dfa48c8e2140" dependencies = [ "utf8parse", ] @@ -52,9 +51,9 @@ dependencies = [ [[package]] name = "anstyle-wincon" -version = "1.0.1" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188" +checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628" dependencies = [ "anstyle", "windows-sys", @@ -62,9 +61,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.71" +version = "1.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" +checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" [[package]] name = "autocfg" @@ -74,9 +73,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "base64" -version = "0.21.2" +version = "0.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" +checksum = "9ba43ea6f343b788c8764558649e08df62f86c6ef251fdaeb1ffd010a9ae50a2" [[package]] name = "bitflags" @@ -86,17 +85,18 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.3.3" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" +checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" [[package]] name = "cc" -version = "1.0.79" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" dependencies = [ "jobserver", + "libc", ] [[package]] @@ -107,20 +107,19 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "clap" -version = "4.3.10" +version = "4.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "384e169cc618c613d5e3ca6404dda77a8685a63e08660dcc64abaf7da7cb0c7a" +checksum = "d04704f56c2cde07f43e8e2c154b43f216dc5c92fc98ada720177362f953b956" dependencies = [ "clap_builder", "clap_derive", - "once_cell", ] [[package]] name = "clap_builder" -version = "4.3.10" +version = "4.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef137bbe35aab78bdb468ccfba75a5f4d8321ae011d34063770780545176af2d" +checksum = "0e231faeaca65ebd1ea3c737966bf858971cd38c3849107aa3ea7de90a804e45" dependencies = [ "anstream", "anstyle", @@ -130,9 +129,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.3.2" +version = "4.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8cd2b2a819ad6eec39e8f1d6b53001af1e5469f8c177579cdaeb313115b825f" +checksum = "0862016ff20d69b84ef8247369fabf5c008a7417002411897d40ee1f4532b873" dependencies = [ "heck", "proc-macro2", @@ -142,9 +141,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" +checksum = "cd7cc57abe963c6d3b9d8be5b06ba7c8957a930305ca90304f24ef040aa6f961" [[package]] name = "colorchoice" @@ -219,6 +218,12 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "deranged" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2696e8a945f658fd14dc3b87242e6b80cd0f36ff04ea560fa39082368847946" + [[package]] name = "dunce" version = "1.0.4" @@ -227,21 +232,21 @@ checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" [[package]] name = "either" -version = "1.8.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] name = "equivalent" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88bffebc5d80432c9b140ee17875ff173a8ab62faad5b257da912bd2f6c1c0a1" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.1" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" +checksum = "136526188508e25c6fef639d7927dfb3e0e3084488bf202267829cf7fc23dbdd" dependencies = [ "errno-dragonfly", "libc", @@ -258,6 +263,12 @@ dependencies = [ "libc", ] +[[package]] +name = "fastrand" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" + [[package]] name = "form_urlencoded" version = "1.2.0" @@ -290,11 +301,11 @@ dependencies = [ [[package]] name = "git2" -version = "0.17.2" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b989d6a7ca95a362cf2cfc5ad688b3a467be1f87e480b8dad07fee8c79b0044" +checksum = "fbf97ba92db08df386e10c8ede66a2a0369bd277090afd8710e19e38de9ec0cd" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.0", "libc", "libgit2-sys", "log", @@ -311,9 +322,9 @@ checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "hashbrown" -version = "0.14.0" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" +checksum = "7dfda62a12f55daeae5015f81b0baea145391cb4520f86c248fc615d72640d12" [[package]] name = "heck" @@ -322,10 +333,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] -name = "hermit-abi" -version = "0.3.1" +name = "home" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" +checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" +dependencies = [ + "windows-sys", +] [[package]] name = "idna" @@ -349,30 +363,19 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.0.0" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +checksum = "8adf3ddd720272c6ea8bf59463c04e0f93d0bbf7c5439b691bca2987e0270897" dependencies = [ "equivalent", - "hashbrown 0.14.0", -] - -[[package]] -name = "is-terminal" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24fddda5af7e54bf7da53067d6e802dbcc381d0a8eef629df528e3ebf68755cb" -dependencies = [ - "hermit-abi", - "rustix", - "windows-sys", + "hashbrown 0.14.1", ] [[package]] name = "itoa" -version = "1.0.7" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0aa48fab2893d8a49caa94082ae8488f4e1050d73b367881dcd2198f4199fd8" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "jobserver" @@ -391,15 +394,15 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.147" +version = "0.2.148" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" +checksum = "9cdc71e17332e86d2e1d38c1f99edcb6288ee11b815fb1a4b049eaa2114d369b" [[package]] name = "libgit2-sys" -version = "0.15.2+1.6.4" +version = "0.16.1+1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a80df2e11fb4a61f4ba2ab42dbe7f74468da143f1a75c74e11dee7c813f694fa" +checksum = "f2a2bb3680b094add03bb3732ec520ece34da31a8cd2d633d1389d0f0fb60d0c" dependencies = [ "cc", "libc", @@ -425,9 +428,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.9" +version = "1.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56ee889ecc9568871456d42f603d6a0ce59ff328d291063a45cbdf0036baf6db" +checksum = "d97137b25e321a73eef1418d1d5d2eda4d77e12813f8e6dead84bc52c5870a7b" dependencies = [ "cc", "libc", @@ -459,6 +462,7 @@ dependencies = [ "serde", "serde_derive", "serde_json", + "tempfile", "termion", "toml", "which", @@ -466,21 +470,21 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.4.3" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09fc20d2ca12cb9f044c93e3bd6d32d523e6e2ec3db4f7b2939cd99026ecd3f0" +checksum = "3852614a3bd9ca9804678ba6be5e3b8ce76dfc902cae004e3e0c44051b6e88db" [[package]] name = "log" -version = "0.4.19" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "memchr" -version = "2.5.0" +version = "2.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c" [[package]] name = "memoffset" @@ -491,16 +495,6 @@ dependencies = [ "autocfg", ] -[[package]] -name = "num_cpus" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" -dependencies = [ - "hermit-abi", - "libc", -] - [[package]] name = "numtoa" version = "0.1.0" @@ -521,9 +515,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.90" +version = "0.9.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "374533b0e45f3a7ced10fcaeccca020e66656bc03dac384f852e4e5a7a8104a6" +checksum = "db4d56a4c0478783083cfafcc42493dd4a981d41669da64b4572a2a089b51b1d" dependencies = [ "cc", "libc", @@ -557,9 +551,9 @@ checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" [[package]] name = "plist" -version = "1.4.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bd9647b268a3d3e14ff09c23201133a62589c658db02bb7388c7246aafe0590" +checksum = "bdc0001cfea3db57a2e24bc0d818e9e20e554b5f97fabb9bc231dc240269ae06" dependencies = [ "base64", "indexmap 1.9.3", @@ -577,27 +571,27 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "proc-macro2" -version = "1.0.63" +version = "1.0.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b368fba921b0dce7e60f5e04ec15e565b3303972b42bcfde1d0713b881959eb" +checksum = "3d433d9f1a3e8c1263d9456598b16fec66f4acc9a74dacffd35c7bb09b3a1328" dependencies = [ "unicode-ident", ] [[package]] name = "quick-xml" -version = "0.28.2" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ce5e73202a820a31f8a0ee32ada5e21029c81fd9e3ebf668a40832e4219d9d1" +checksum = "81b9228215d82c7b61490fec1de287136b5de6f5700f6e58ea9ad61a7964ca51" dependencies = [ "memchr", ] [[package]] name = "quote" -version = "1.0.29" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "573015e8ab27661678357f27dc26460738fd2b6c86e46f386fde94cb5d913105" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -634,9 +628,9 @@ dependencies = [ [[package]] name = "rayon" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" +checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" dependencies = [ "either", "rayon-core", @@ -644,14 +638,12 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" +checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" dependencies = [ - "crossbeam-channel", "crossbeam-deque", "crossbeam-utils", - "num_cpus", ] [[package]] @@ -663,20 +655,41 @@ dependencies = [ "bitflags 1.3.2", ] +[[package]] +name = "redox_syscall" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +dependencies = [ + "bitflags 1.3.2", +] + [[package]] name = "redox_termios" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8440d8acb4fd3d277125b4bd01a6f38aee8d814b3b5fc09b3f2b825d37d3fe8f" dependencies = [ - "redox_syscall", + "redox_syscall 0.2.16", ] [[package]] name = "regex" -version = "1.8.4" +version = "1.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebee201405406dbf528b8b672104ae6d6d63e6d118cb10e4d51abbc7b58044ff" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0ab3ca65655bb1e41f2a8c8cd662eb4fb035e67c3f78da1d61dffe89d07300f" +checksum = "59b23e92ee4318893fa3fe3e6fb365258efbfe6ac6ab30f090cdcbb7aa37efa9" dependencies = [ "aho-corasick", "memchr", @@ -685,9 +698,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.7.2" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78" +checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" [[package]] name = "run_script" @@ -700,11 +713,11 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.2" +version = "0.38.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aabcb0461ebd01d6b79945797c27f8529082226cb630a9865a71870ff63532a4" +checksum = "d2f9da0cbd88f9f09e7814e388301c8414c51c62aa6ce1e4b5c551d49d96e531" dependencies = [ - "bitflags 2.3.3", + "bitflags 2.4.0", "errno", "libc", "linux-raw-sys", @@ -713,9 +726,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.13" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" [[package]] name = "safemem" @@ -725,21 +738,24 @@ checksum = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072" [[package]] name = "scopeguard" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "serde" -version = "1.0.164" +version = "1.0.188" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e8c8cf938e98f769bc164923b06dce91cea1751522f46f8466461af04c9027d" +checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" +dependencies = [ + "serde_derive", +] [[package]] name = "serde_derive" -version = "1.0.164" +version = "1.0.188" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9735b638ccc51c28bf6914d90a2e9725b377144fc612c49a611fddd1b631d68" +checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" dependencies = [ "proc-macro2", "quote", @@ -748,9 +764,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.99" +version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46266871c240a00b8f503b877622fe33430b3c7d963bdc0f2adc511e54a1eae3" +checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65" dependencies = [ "itoa", "ryu", @@ -774,15 +790,28 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "syn" -version = "2.0.23" +version = "2.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59fb7d6d8281a51045d62b8eb3a7d1ce347b76f312af50cd3dc0af39c87c1737" +checksum = "7303ef2c05cd654186cb250d29049a24840ca25d2747c25c0381c8d9e2f582e8" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] +[[package]] +name = "tempfile" +version = "3.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef" +dependencies = [ + "cfg-if", + "fastrand", + "redox_syscall 0.3.5", + "rustix", + "windows-sys", +] + [[package]] name = "termion" version = "1.5.6" @@ -791,16 +820,17 @@ checksum = "077185e2eac69c3f8379a4298e1e07cd36beb962290d4a51199acf0fdc10607e" dependencies = [ "libc", "numtoa", - "redox_syscall", + "redox_syscall 0.2.16", "redox_termios", ] [[package]] name = "time" -version = "0.3.22" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea9e1b3cf1243ae005d9e74085d4d542f3125458f3a81af210d901dcd7411efd" +checksum = "426f806f4089c493dcac0d24c29c01e2c38baf8e30f1b716ee37e83d200b18fe" dependencies = [ + "deranged", "itoa", "serde", "time-core", @@ -809,15 +839,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.9" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "372950940a5f07bf38dbe211d7283c9e6d7327df53794992d293e534c733d09b" +checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" dependencies = [ "time-core", ] @@ -839,9 +869,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "toml" -version = "0.7.5" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ebafdf5ad1220cb59e7d17cf4d2c72015297b75b19a10472f99b89225089240" +checksum = "1bc1433177506450fe920e46a4f9812d0c211f5dd556da10e731a0a3dfa151f0" dependencies = [ "serde", "serde_spanned", @@ -860,11 +890,11 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.19.11" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "266f016b7f039eec8a1a80dfe6156b633d208b9fccca5e4db1d6775b0c4e34a7" +checksum = "ca676d9ba1a322c1b64eb8045a5ec5c0cfb0c9d08e15e9ff622589ad5221c8fe" dependencies = [ - "indexmap 2.0.0", + "indexmap 2.0.2", "serde", "serde_spanned", "toml_datetime", @@ -888,9 +918,9 @@ checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.9" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" @@ -903,9 +933,9 @@ dependencies = [ [[package]] name = "url" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" +checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" dependencies = [ "form_urlencoded", "idna", @@ -932,13 +962,14 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "which" -version = "4.4.0" +version = "4.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2441c784c52b289a054b7201fc93253e288f094e2f4be9058343127c4226a269" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" dependencies = [ "either", - "libc", + "home", "once_cell", + "rustix", ] [[package]] @@ -974,9 +1005,9 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.48.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ "windows_aarch64_gnullvm", "windows_aarch64_msvc", @@ -989,51 +1020,51 @@ dependencies = [ [[package]] name = "windows_aarch64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_i686_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_x86_64_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "winnow" -version = "0.4.7" +version = "0.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca0ace3845f0d96209f0375e6d367e3eb87eb65d27d445bdc9f1843a26f39448" +checksum = "7c2e3184b9c4e92ad5167ca73039d0c42476302ab603e2fec4487511f38ccefc" dependencies = [ "memchr", ] diff --git a/Cargo.toml b/Cargo.toml index c3c9483..139facb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,3 +22,4 @@ crossbeam = "*" termion = "1.5" git2 = "*" run_script = "0.10" +tempfile = "*" diff --git a/defaults/HelloTS.lf b/defaults/HelloTS.lf new file mode 100644 index 0000000..bb64fdd --- /dev/null +++ b/defaults/HelloTS.lf @@ -0,0 +1,5 @@ +target TypeScript + +main reactor { + reaction(startup) {= console.log("Hello World"); =} +} diff --git a/derivation.nix b/derivation.nix index 0d9792c..19f9a4c 100644 --- a/derivation.nix +++ b/derivation.nix @@ -1,4 +1,4 @@ -{ naersk, src, lib, pkg-config, cmake, zlib, openssl }: +{ naersk, src, lib, pkg-config, cmake, zlib, openssl, glibc}: naersk.buildPackage { pname = "lingo"; @@ -8,8 +8,8 @@ naersk.buildPackage { cargoSha256 = lib.fakeSha256; - nativeBuildInputs = [ pkg-config cmake ]; - buildInputs = [ zlib openssl ]; + nativeBuildInputs = [ pkg-config cmake zlib openssl glibc]; + buildInputs = [ ]; meta = with lib; { description = "Simple package manager for lingua franca"; diff --git a/flake.lock b/flake.lock index 6d288d2..11a72f9 100644 --- a/flake.lock +++ b/flake.lock @@ -5,11 +5,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1688229166, - "narHash": "sha256-9lGDg8K1ASjTThzYjctdgd35WqocIIeakQXs5tAbQsM=", + "lastModified": 1698420672, + "narHash": "sha256-/TdeHMPRjjdJub7p7+w55vyABrsJlt5QkznPYy55vKA=", "owner": "nix-community", "repo": "naersk", - "rev": "714e701eb4ca2491d34d794b98be4b994a796ae7", + "rev": "aeb58d5e8faead8980a807c840232697982d47b9", "type": "github" }, "original": { @@ -20,11 +20,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1688188316, - "narHash": "sha256-CXuQllDKCxtZaB/umnZOvoJ/d4kJguYgffeTA9l1B3o=", + "lastModified": 1699343069, + "narHash": "sha256-s7BBhyLA6MI6FuJgs4F/SgpntHBzz40/qV0xLPW6A1Q=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "8277b539d371bf4308fc5097911aa58bfac1794f", + "rev": "ec750fd01963ab6b20ee1f0cb488754e8036d89d", "type": "github" }, "original": { @@ -34,18 +34,16 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1688049487, - "narHash": "sha256-100g4iaKC9MalDjUW9iN6Jl/OocTDtXdeAj7pEGIRh4=", + "lastModified": 1699343069, + "narHash": "sha256-s7BBhyLA6MI6FuJgs4F/SgpntHBzz40/qV0xLPW6A1Q=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "4bc72cae107788bf3f24f30db2e2f685c9298dc9", + "rev": "ec750fd01963ab6b20ee1f0cb488754e8036d89d", "type": "github" }, "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" + "id": "nixpkgs", + "type": "indirect" } }, "root": { @@ -75,11 +73,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1687709756, - "narHash": "sha256-Y5wKlQSkgEK2weWdOu4J3riRd+kV/VCgHsqLNTTWQ/0=", + "lastModified": 1694529238, + "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", "owner": "numtide", "repo": "flake-utils", - "rev": "dbabf0ca0c0c4bce6ea5eaf65af5cb694d2082c7", + "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 2cde91a..1b1408f 100644 --- a/flake.nix +++ b/flake.nix @@ -1,7 +1,5 @@ { inputs = { - nixpkgs.url = github:NixOS/nixpkgs/nixos-unstable; - naersk = { url = github:nix-community/naersk; }; diff --git a/src/args.rs b/src/args.rs index bfbc77f..0149425 100644 --- a/src/args.rs +++ b/src/args.rs @@ -3,7 +3,7 @@ use clap::{Args, Parser, Subcommand}; use serde_derive::{Deserialize, Serialize}; use std::path::PathBuf; -#[derive(clap::ValueEnum, Clone, Copy, Debug, Deserialize, Serialize)] +#[derive(clap::ValueEnum, Clone, Copy, Debug, Deserialize, Serialize, PartialEq)] pub enum TargetLanguage { C, Cpp, @@ -16,6 +16,7 @@ pub enum TargetLanguage { pub enum Platform { Native, Zephyr, + RP2040, } #[derive(clap::ValueEnum, Clone, Copy, Debug, Deserialize, Serialize, Eq, PartialEq, Hash)] @@ -23,6 +24,8 @@ pub enum BuildSystem { LFC, CMake, Cargo, + Npm, + Pnpm, } #[derive(Args, Debug)] @@ -85,16 +88,17 @@ impl ToString for TargetLanguage { pub struct InitArgs { #[clap(value_enum, short, long)] pub language: Option, - #[clap(value_enum, short, long, default_value_t = Platform::Native)] pub platform: Platform, } impl InitArgs { pub fn get_target_language(&self) -> TargetLanguage { self.language.unwrap_or({ - // Target language for Zephyr is C, else Cpp. + // Target language for Zephyr and RP2040 is C + // Else use Cpp. match self.platform { Platform::Zephyr => TargetLanguage::C, + Platform::RP2040 => TargetLanguage::C, _ => TargetLanguage::Cpp, } }) @@ -106,7 +110,7 @@ pub enum Command { /// initializing a lingua-franca project Init(InitArgs), - /// compiling one ore multiple binaries in a lingua-franca package + /// compiling one or multiple binaries in a lingua-franca package Build(BuildArgs), /// Updates the dependencies and potentially build tools diff --git a/src/backends/cmake.rs b/src/backends/cmake.rs index f5278cc..24c7d26 100644 --- a/src/backends/cmake.rs +++ b/src/backends/cmake.rs @@ -12,10 +12,12 @@ use crate::backends::{ pub struct Cmake; fn gen_cmake_files(app: &App, options: &BuildCommandOptions) -> BuildResult { + println!("ERROR: {:?}", app.src_dir_path()); let build_dir = app.output_root.join("build"); fs::create_dir_all(&build_dir)?; let mut cmake = Command::new("cmake"); + // cmake args cmake.arg(format!( "-DCMAKE_BUILD_TYPE={}", if options.profile == BuildProfile::Release { @@ -32,7 +34,12 @@ fn gen_cmake_files(app: &App, options: &BuildCommandOptions) -> BuildResult { cmake.arg("-DREACTOR_CPP_VALIDATE=ON"); cmake.arg("-DREACTOR_CPP_TRACE=OFF"); cmake.arg("-DREACTOR_CPP_LOG_LEVEL=3"); - cmake.arg(format!("-DLF_SRC_PKG_PATH={}", app.root_path.display())); + cmake.arg(format!( + "-DLF_SRC_PKG_PATH={}", + app.src_dir_path() + .expect("not a valid main reactor path") + .display() + )); cmake.arg(app.src_gen_dir()); cmake.arg(format!("-B {}", build_dir.display())); cmake.current_dir(&build_dir); @@ -41,6 +48,7 @@ fn gen_cmake_files(app: &App, options: &BuildCommandOptions) -> BuildResult { } fn do_cmake_build(results: &mut BatchBuildResults, options: &BuildCommandOptions) { + results.keep_going(options.keep_going); super::lfc::LFC::do_parallel_lfc_codegen(options, results, true); if !options.compile_target_code { return; @@ -77,6 +85,11 @@ fn do_cmake_build(results: &mut BatchBuildResults, options: &BuildCommandOptions let cmake_binary_name = app.main_reactor.file_stem().unwrap(); // cleanup: rename executable to match the app name let bin_dir = app.output_root.join("bin"); + println!( + "moving {:?} to {:?}", + bin_dir.join(cmake_binary_name), + app.executable_path() + ); fs::rename(bin_dir.join(cmake_binary_name), app.executable_path())?; Ok(()) }); diff --git a/src/backends/lfc.rs b/src/backends/lfc.rs index 1cf3702..be52997 100644 --- a/src/backends/lfc.rs +++ b/src/backends/lfc.rs @@ -19,7 +19,9 @@ impl LFC { results: &mut BatchBuildResults, compile_target_code: bool, ) { - results.par_map(|app| LFC::do_lfc_codegen(app, options, compile_target_code)); + results.keep_going(options.keep_going); + // TODO: using map_par introduced a race condition + results.map(|app| LFC::do_lfc_codegen(app, options, compile_target_code)); } /// Do codegen for a single app. @@ -48,7 +50,7 @@ impl BatchBackend for LFC { CommandSpec::Update => todo!(), CommandSpec::Clean => { results.par_map(|app| { - fs::remove_dir_all(app.src_gen_dir())?; + crate::util::default_build_clean(&app.output_root)?; Ok(()) }); } @@ -89,10 +91,11 @@ impl<'a> LfcJsonArgs<'a> { .unwrap() .as_object_mut() .unwrap(); - - if !self.no_compile { - properties.insert("no-compile".to_string(), serde_json::Value::Bool(true)); + // lfc does not support no-compile:false + if self.no_compile { + properties.insert("no-compile".to_string(), self.no_compile.into()); } + Ok(value) } } diff --git a/src/backends/mod.rs b/src/backends/mod.rs index 30e5d1d..ad0bdba 100644 --- a/src/backends/mod.rs +++ b/src/backends/mod.rs @@ -5,12 +5,14 @@ use std::sync::Arc; use rayon::prelude::*; -use crate::args::Platform; +use crate::args::{BuildSystem, Platform}; +use crate::package::App; use crate::util::errors::{AnyError, BuildResult, LingoError}; -use crate::{args::BuildSystem, package::App}; pub mod cmake; pub mod lfc; +pub mod npm; +pub mod pnpm; pub fn execute_command<'a>(command: &CommandSpec, apps: &[&'a App]) -> BatchBuildResults<'a> { // Group apps by build system @@ -38,6 +40,8 @@ pub fn execute_command<'a>(command: &CommandSpec, apps: &[&'a App]) -> BatchBuil match build_system { BuildSystem::LFC => lfc::LFC.execute_command(command, &mut sub_res), BuildSystem::CMake => cmake::Cmake.execute_command(command, &mut sub_res), + BuildSystem::Npm => npm::Npm.execute_command(command, &mut sub_res), + BuildSystem::Pnpm => pnpm::Pnpm.execute_command(command, &mut sub_res), BuildSystem::Cargo => todo!(), }; result.append(sub_res); @@ -64,6 +68,8 @@ pub struct BuildCommandOptions { /// that the number will be automatically determined. /// A value of one effectively disables parallel builds. pub max_threads: usize, + /// if compilation should continue if one of the apps fails building + pub keep_going: bool, } /// Description of a lingo command @@ -85,6 +91,7 @@ pub trait BatchBackend { /// Collects build results by app. pub struct BatchBuildResults<'a> { results: Vec<(&'a App, BuildResult)>, + keep_going: bool, } impl<'a> BatchBuildResults<'a> { @@ -92,6 +99,7 @@ impl<'a> BatchBuildResults<'a> { fn new() -> Self { Self { results: Vec::new(), + keep_going: false, } } @@ -100,8 +108,13 @@ impl<'a> BatchBuildResults<'a> { fn for_apps(apps: &[&'a App]) -> Self { Self { results: apps.iter().map(|&a| (a, Ok(()))).collect(), + keep_going: false, } } + /// sets the keep going value + fn keep_going(&mut self, value: bool) { + self.keep_going = value + } /// Print this result collection to standard output. pub fn print_results(&self) { @@ -137,6 +150,14 @@ impl<'a> BatchBuildResults<'a> { self.results.iter_mut().for_each(|(app, res)| { if let Ok(()) = res { *res = f(app); + + if (*res).is_err() && !self.keep_going { + panic!( + "build step failed because of {} with main reactor {}!", + &app.name, + &app.main_reactor.display() + ); + } } }); self @@ -151,6 +172,15 @@ impl<'a> BatchBuildResults<'a> { self.results.par_iter_mut().for_each(|(app, res)| { if let Ok(()) = res { *res = f(app); + + if (*res).is_err() && !self.keep_going { + panic!( + "build step failed with error {:?} because of app {} with main reactor {}!", + &res, + &app.name, + &app.main_reactor.display() + ); + } } }); self @@ -169,12 +199,18 @@ impl<'a> BatchBuildResults<'a> { .iter() .filter_map(|&(app, ref res)| res.as_ref().ok().map(|()| app)) .collect(); + if vec.is_empty() { return self; } + match f(&vec) { Ok(()) => { /* Do nothing, all apps have succeeded. */ } Err(e) => { + if !self.keep_going { + panic!("build step failed!"); + } + // Mark all as failed for the same reason. let shared: Arc = e.into(); for (_app, res) in &mut self.results { diff --git a/src/backends/npm.rs b/src/backends/npm.rs new file mode 100644 index 0000000..1e465bb --- /dev/null +++ b/src/backends/npm.rs @@ -0,0 +1,143 @@ +use crate::util::errors::LingoError; +use crate::util::execute_command_to_build_result; +use std::error::Error; +use std::ffi::OsString; +use std::fs; +use std::path::{Path, PathBuf}; +use std::process::Command; + +pub struct Npm; + +pub struct TypeScriptToolCommands { + pub binary_name: &'static str, + pub install_command: &'static str, + pub release_build_argument: &'static str, +} + +use crate::backends::{ + BatchBackend, BatchBuildResults, BuildCommandOptions, BuildProfile, CommandSpec, +}; + +pub fn do_typescript_build( + results: &mut BatchBuildResults, + options: &BuildCommandOptions, + commands: TypeScriptToolCommands, +) { + results.keep_going(options.keep_going); + super::lfc::LFC::do_parallel_lfc_codegen(options, results, false); + if !options.compile_target_code { + return; + } + + let extract_name = |path: &PathBuf| -> Result> { + match Path::new(&path).file_stem() { + Some(value) => value + .to_str() + .map(String::from) + .ok_or(Box::new(LingoError::InvalidMainReactor)), + None => Err(Box::new(LingoError::InvalidMainReactor)), + } + }; + + let extract_location = |main_reactor: &PathBuf, + root_path: &PathBuf| + -> Result> { + let output_dir = main_reactor.strip_prefix(root_path)?; + + let src_index = output_dir + .iter() + .map(|x| x.to_os_string()) + .position(|element| element == OsString::from("src")) + .ok_or(LingoError::InvalidMainReactor)?; + + let mut path_copy: Vec = output_dir + .clone() + .iter() + .map(|x| x.to_os_string()) + .collect(); + path_copy.drain(0..src_index + 1); + + let mut new_path_buf: PathBuf = PathBuf::new(); + + for element in path_copy { + new_path_buf.push(element); + } + + new_path_buf.set_extension(""); + Ok(new_path_buf) + }; + + results + .map(|app| { + let src_postfix = extract_location(&app.main_reactor, &app.root_path)?; + let path = app.output_root.join("src-gen").join(src_postfix); + + let mut npm_install = Command::new(commands.binary_name); + npm_install.current_dir(path); + npm_install.arg(commands.install_command); + if options.profile == BuildProfile::Release { + npm_install.arg(commands.release_build_argument); + } + println!("executing {:?}", &npm_install); + execute_command_to_build_result(npm_install)?; + Ok(()) + }) + .map(|app| { + let src_postfix = extract_location(&app.main_reactor, &app.root_path)?; // path after src + let path = app.output_root.join("src-gen").join(src_postfix); + + let mut npm_build = Command::new(commands.binary_name); + npm_build.current_dir(path); + npm_build.arg("run"); + npm_build.arg("build"); + + if options.profile == BuildProfile::Release { + npm_build.arg(commands.release_build_argument); + } + + println!("executing {:?}", &npm_build); + execute_command_to_build_result(npm_build)?; + + Ok(()) + }) + .map(|app| { + fs::create_dir_all(app.output_root.join("bin"))?; + let file_name = extract_name(&app.main_reactor)?; + let src_postfix = extract_location(&app.main_reactor, &app.root_path)?; // path after src + + let path = app + .output_root + .join("src-gen") + .join(&src_postfix) + .join("dist") + .join(file_name + ".js"); + + // cleanup: rename executable to match the app name + fs::rename(path, app.executable_path())?; + Ok(()) + }); +} + +impl BatchBackend for Npm { + fn execute_command(&mut self, command: &CommandSpec, results: &mut BatchBuildResults) { + match command { + CommandSpec::Build(options) => do_typescript_build( + results, + options, + TypeScriptToolCommands { + binary_name: "npm", + install_command: "install", + release_build_argument: "--production", + }, + ), + CommandSpec::Clean => { + results.par_map(|app| { + crate::util::default_build_clean(&app.output_root)?; + crate::util::delete_subdirs(&app.output_root, &["node_modules", "dist"])?; + Ok(()) + }); + } + _ => todo!(), + } + } +} diff --git a/src/backends/pnpm.rs b/src/backends/pnpm.rs new file mode 100644 index 0000000..e3463c1 --- /dev/null +++ b/src/backends/pnpm.rs @@ -0,0 +1,29 @@ +use crate::backends::npm::{do_typescript_build, TypeScriptToolCommands}; + +pub struct Pnpm; + +use crate::backends::{BatchBackend, BatchBuildResults, CommandSpec}; + +impl BatchBackend for Pnpm { + fn execute_command(&mut self, command: &CommandSpec, results: &mut BatchBuildResults) { + match command { + CommandSpec::Build(options) => do_typescript_build( + results, + options, + TypeScriptToolCommands { + binary_name: "pnpm", + install_command: "install", + release_build_argument: "--prod", + }, + ), + CommandSpec::Clean => { + results.par_map(|app| { + crate::util::default_build_clean(&app.output_root)?; + crate::util::delete_subdirs(&app.output_root, &["node_modules", "dist"])?; + Ok(()) + }); + } + _ => todo!(), + } + } +} diff --git a/src/main.rs b/src/main.rs index b9d7b1a..19648bd 100644 --- a/src/main.rs +++ b/src/main.rs @@ -119,6 +119,7 @@ fn build<'a>(args: &BuildArgs, config: &'a Config) -> BatchBuildResults<'a> { compile_target_code: !args.no_compile, lfc_exec_path: util::find_lfc_exec(args).expect("TODO replace me"), max_threads: args.threads, + keep_going: args.keep_going, }), config, args.keep_going, diff --git a/src/package/mod.rs b/src/package/mod.rs index 5e57d2a..8f1db4a 100644 --- a/src/package/mod.rs +++ b/src/package/mod.rs @@ -10,9 +10,11 @@ use std::io::ErrorKind; use std::path::{Path, PathBuf}; use std::{env, io}; -use crate::args::BuildSystem::{CMake, Cargo, LFC}; +use crate::args::BuildSystem::{CMake, LFC}; use crate::util::errors::{BuildResult, LingoError}; use git2::Repository; +use tempfile::tempdir; +use which::which; fn is_valid_location_for_project(path: &std::path::Path) -> bool { !path.join("src").exists() && !path.join(".git").exists() && !path.join("application").exists() @@ -73,15 +75,15 @@ pub struct AppFile { pub struct App { /// Absolute path to the directory where the Lingo.toml file is located. pub root_path: PathBuf, - /// Name of the app (and the final binary). pub name: String, /// Root directory where to place src-gen and other compilation-specifics stuff. pub output_root: PathBuf, - /// Absolute path to the main reactor file. pub main_reactor: PathBuf, + /// target language of this lf program pub target: TargetLanguage, + /// platform for which this program should be compiled pub platform: Platform, pub dependencies: HashMap, @@ -92,7 +94,13 @@ impl App { pub fn build_system(&self) -> BuildSystem { match self.target { TargetLanguage::Cpp => CMake, - TargetLanguage::Rust => Cargo, + TargetLanguage::TypeScript => { + if which("pnpm").is_ok() { + BuildSystem::Pnpm + } else { + BuildSystem::Npm + } + } _ => LFC, } } @@ -101,21 +109,34 @@ impl App { } pub fn executable_path(&self) -> PathBuf { let mut p = self.output_root.join("bin"); - p.push(&self.name); + if self.target == TargetLanguage::TypeScript { + p.push(self.name.clone() + ".js") + } else { + p.push(&self.name); + } p } + + pub fn src_dir_path(&self) -> Option { + for path in self.main_reactor.ancestors() { + if path.ends_with("src") { + return Some(path.clone().to_path_buf()); + } + } + None + } } -/// Simple or DetailedDependcy +/// Simple or DetailedDependency #[derive(Clone, Deserialize, Serialize)] -pub enum FileDependcy { +pub enum FileDependency { // the version string Simple(String), /// version string and source Advanced(DetailedDependency), } -/// Dependcy with source and version +/// Dependency with source and version #[derive(Clone, Deserialize, Serialize)] pub struct DetailedDependency { version: String, @@ -202,6 +223,7 @@ impl ConfigFile { let hello_world_code: &'static str = match self.apps[0].target { TargetLanguage::Cpp => include_str!("../../defaults/HelloCpp.lf"), TargetLanguage::C => include_str!("../../defaults/HelloC.lf"), + TargetLanguage::TypeScript => include_str!("../../defaults/HelloTS.lf"), _ => panic!("Target langauge not supported yet"), // FIXME: Add examples for other programs }; @@ -209,23 +231,32 @@ impl ConfigFile { Ok(()) } - // Sets up a LF project with Zephyr as the target platform. - pub fn setup_zephyr(&self) -> BuildResult { - // Clone lf-west-template into a temporary directory - let tmp_path = Path::new("zephyr_tmp"); - if tmp_path.exists() { - remove_dir_all(tmp_path)?; - } - let url = "https://github.com/lf-lang/lf-west-template"; + fn setup_template_repo(&self, url: &str) -> BuildResult { + let dir = tempdir()?; + let tmp_path = dir.path(); Repository::clone(url, tmp_path)?; - // Copy the cloned template repo into the project directory copy_recursively(tmp_path, Path::new("."))?; + // Remove temporary folder + dir.close()?; + Ok(()) + } - // Remove .git, .gitignore ad temporary folder + // Sets up a LF project with Zephyr as the target platform. + fn setup_zephyr(&self) -> BuildResult { + let url = "https://github.com/lf-lang/lf-west-template"; + self.setup_template_repo(url)?; remove_file(".gitignore")?; remove_dir_all(Path::new(".git"))?; - remove_dir_all(tmp_path)?; + Ok(()) + } + + // Sets up a LF project with RP2040 MCU as the target platform. + // Initializes a repo using the lf-pico-template + fn setup_rp2040(&self) -> BuildResult { + let url = "https://github.com/lf-lang/lf-pico-template"; + // leave git artifacts + self.setup_template_repo(url)?; Ok(()) } @@ -234,6 +265,7 @@ impl ConfigFile { match self.apps[0].platform { Some(Platform::Native) => self.setup_native(), Some(Platform::Zephyr) => self.setup_zephyr(), + Some(Platform::RP2040) => self.setup_rp2040(), _ => Ok(()), } } else { diff --git a/src/util/command_line.rs b/src/util/command_line.rs index 15b9a3b..fde75ed 100644 --- a/src/util/command_line.rs +++ b/src/util/command_line.rs @@ -71,7 +71,10 @@ pub fn run_and_capture(command: &mut Command) -> io::Result<(ExitStatus, Vec pub fn execute_command_to_build_result(mut command: Command) -> BuildResult { match run_and_capture(&mut command) { - Err(e) => Err(Box::new(e)), + Err(e) => { + eprintln!("error occured while executing commandline: {:?}", &e); + Err(Box::new(e)) + } Ok((status, _, _)) if !status.success() => { Err(Box::new(LingoError::CommandFailed(command, status))) } diff --git a/src/util/errors.rs b/src/util/errors.rs index b11ccb9..5cce66e 100644 --- a/src/util/errors.rs +++ b/src/util/errors.rs @@ -15,6 +15,7 @@ pub enum LingoError { UnknownAppNames(Vec), InvalidProjectLocation(PathBuf), UseWestBuildToBuildApp, + InvalidMainReactor, } impl Display for LingoError { @@ -35,6 +36,12 @@ impl Display for LingoError { LingoError::UseWestBuildToBuildApp => { write!(f, "Use `west lf-build` to build and run Zephyr programs.") } + LingoError::InvalidMainReactor => { + write!( + f, + "Not a valid path path to a file that contains a main reactor" + ) + } } } } diff --git a/test.sh b/test.sh deleted file mode 100755 index 4d7b992..0000000 --- a/test.sh +++ /dev/null @@ -1,11 +0,0 @@ -cargo b --release -git clone https://github.com/lf-lang/lingua-franca.git ./lf-test -curl -L0 https://github.com/lf-lang/lingua-franca/releases/download/v0.4.0/lf-cli-0.4.0.tar.gz --output ./lf-release.tar.gz -tar -xvf ./lf-release.tar.gz -#tar -xf ./lf-release.tar.gz -#sed -i 's/#!//bin//bash/#!//run//current-system//sw//bin//bash//' lf-cli-0.4.0/bin/lfc -cp test/Lingo-Cpp.toml ./lf-test/test/Cpp/Lingo.toml -cd ./lf-test/test/Cpp -ls ../../../ -ls -../../../target/release/lingo build --lfc ../../../lf-cli-0.4.0/bin/lfc diff --git a/test/Lingo-Cpp.toml b/test/Lingo-Cpp.toml index 33b944b..91811f2 100644 --- a/test/Lingo-Cpp.toml +++ b/test/Lingo-Cpp.toml @@ -1,1093 +1,11 @@ [package] -name = "Tests" -version = "0.1.0" +name = "Cpp-Tests" +version = "0.2.0" homepage = "https://lf-lang.org" -description = "All Lingua-Franca Unit Tests" +description = "All Cpp Lingua-Franca Unit Tests" # shared properties of all binaries [properties] -no-compile = true - - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/ActionDelay.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/ActionWithNoReaction.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/After.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/ArrayAsParameter.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/ArrayAsType.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/ArrayPrint.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/ArrayScale.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/Composition.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/CompositionAfter.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/CountTest.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/DanglingOutput.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/Deadline.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/DeadlineHandledAbove.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/DelayInt.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/DelayedAction.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/DelayedReaction.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/Determinism.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/DoubleInvocation.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/DoubleReaction.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/DoubleTrigger.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/FloatLiteral.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/Gain.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/GetTime.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/Hello.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/HelloWorld.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/Hierarchy.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/Hierarchy2.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/Import.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/Microsteps.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/Minimal.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/MovingAverage.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/MultipleContained.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/NativeListsAndTimes.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/ParameterizedState.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/PeriodicDesugared.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/PhysicalConnection.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/Preamble.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/ReadOutputOfContainedReactor.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/Schedule.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/ScheduleLogicalAction.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/SendingInside.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/SendingInside2.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/SendsPointerTest.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/SimpleDeadline.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/SimpleImport.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/SlowingClock.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/SlowingClockPhysical.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/Stop.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/Stride.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/StructAsState.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/StructAsType.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/StructAsTypeDirect.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/StructPrint.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/StructScale.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/TestForPreviousOutput.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/TimeLimit.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/TimeState.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/Wcet.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/concurrent/AsyncCallback.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/docker/HelloWorldContainerized.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/docker/federated/DistributedCountContainerized.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/federated/ChainWithDelay.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/federated/DistributedCount.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/federated/DistributedCountPhysical.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/federated/DistributedCountPhysicalAfterDelay.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/federated/DistributedDoublePort.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/federated/DistributedLoopedAction.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/federated/DistributedLoopedPhysicalAction.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/federated/DistributedStop.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/federated/DistributedStopZero.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/federated/HelloDistributed.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/federated/LoopDistributedCentralized.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/federated/LoopDistributedDouble.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/federated/PingPongDistributed.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/federated/PingPongDistributedPhysical.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/federated/SimpleFederated.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/federated/SpuriousDependency.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/federated/StopAtShutdown.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/federated/TopLevelArtifacts.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/multiport/BankMulticast.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/multiport/BankMultiportToReaction.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/multiport/BankReactionsInContainer.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/multiport/BankSelfBroadcast.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/multiport/BankToBank.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/multiport/BankToBankMultiport.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/multiport/BankToBankMultiportAfter.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/multiport/BankToMultiport.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/multiport/BankToReaction.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/multiport/Broadcast.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/multiport/BroadcastAfter.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/multiport/BroadcastMultipleAfter.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/multiport/FullyConnected.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/multiport/MultiportFromBank.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/multiport/MultiportFromBankHierarchy.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/multiport/MultiportFromBankHierarchyAfter.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/multiport/MultiportFromHierarchy.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/multiport/MultiportFromReaction.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/multiport/MultiportIn.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/multiport/MultiportInParameterized.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/multiport/MultiportMutableInput.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/multiport/MultiportMutableInputArray.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/multiport/MultiportOut.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/multiport/MultiportToBank.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/multiport/MultiportToBankAfter.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/multiport/MultiportToBankDouble.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/multiport/MultiportToBankHierarchy.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/multiport/MultiportToHierarchy.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/multiport/MultiportToMultiport.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/multiport/MultiportToMultiport2.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/multiport/MultiportToMultiport2After.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/multiport/MultiportToMultiportArray.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/multiport/MultiportToMultiportParameter.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/multiport/MultiportToPort.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/multiport/MultiportToReaction.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/multiport/NestedBanks.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/multiport/PipelineAfter.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/multiport/ReactionToContainedBank.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/multiport/ReactionsToNested.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/serialization/ProtoNoPacking.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "TypeScript" -platform = "Native" -main_reactor = "TypeScript/src/target/AfterNoTypes.lf" - -[app.dependencies] - -[app.properties] [[app]] target = "Cpp" @@ -1206,24 +124,6 @@ main_reactor = "Cpp/src/ArrayScale.lf" [app.properties] -[[app]] -target = "Cpp" -platform = "Native" -main_reactor = "Cpp/src/Banking.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "Cpp" -platform = "Native" -main_reactor = "Cpp/src/BenchmarkRunner.lf" - -[app.dependencies] - -[app.properties] - [[app]] target = "Cpp" platform = "Native" @@ -1260,15 +160,6 @@ main_reactor = "Cpp/src/CompositionGain.lf" [app.properties] -[[app]] -target = "Cpp" -platform = "Native" -main_reactor = "Cpp/src/ConnectionMerging.lf" - -[app.dependencies] - -[app.properties] - [[app]] target = "Cpp" platform = "Native" @@ -1764,59 +655,60 @@ main_reactor = "Cpp/src/Stride.lf" [app.properties] -[[app]] -target = "Cpp" -platform = "Native" -main_reactor = "Cpp/src/StructAsState.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "Cpp" -platform = "Native" -main_reactor = "Cpp/src/StructAsType.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "Cpp" -platform = "Native" -main_reactor = "Cpp/src/StructAsTypeDirect.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "Cpp" -platform = "Native" -main_reactor = "Cpp/src/StructParallel.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "Cpp" -platform = "Native" -main_reactor = "Cpp/src/StructPrint.lf" - -[app.dependencies] - -[app.properties] - -[[app]] -target = "Cpp" -platform = "Native" -main_reactor = "Cpp/src/StructScale.lf" - -[app.dependencies] - -[app.properties] +# TODO: include not working properly +#[[app]] +#target = "Cpp" +#platform = "Native" +#main_reactor = "Cpp/src/StructAsState.lf" +# +#[app.dependencies] +# +#[app.properties] +# +#[[app]] +#target = "Cpp" +#platform = "Native" +#main_reactor = "Cpp/src/StructAsType.lf" +# +#[app.dependencies] +# +#[app.properties] +# +#[[app]] +#target = "Cpp" +#platform = "Native" +#main_reactor = "Cpp/src/StructAsTypeDirect.lf" +# +#[app.dependencies] +# +#[app.properties] +# +#[[app]] +#target = "Cpp" +#platform = "Native" +#main_reactor = "Cpp/src/StructParallel.lf" +# +#[app.dependencies] +# +#[app.properties] +# +#[[app]] +#target = "Cpp" +#platform = "Native" +#main_reactor = "Cpp/src/StructPrint.lf" +# +#[app.dependencies] +# +#[app.properties] +# +#[[app]] +#target = "Cpp" +#platform = "Native" +#main_reactor = "Cpp/src/StructScale.lf" +# +#[app.dependencies] +# +#[app.properties] [[app]] target = "Cpp" @@ -2187,15 +1079,6 @@ main_reactor = "Cpp/src/enclave/EnclaveCycle.lf" [app.properties] -[[app]] -target = "Cpp" -platform = "Native" -main_reactor = "Cpp/src/enclave/EnclaveCycle2lf" - -[app.dependencies] - -[app.properties] - [[app]] target = "Cpp" platform = "Native" diff --git a/test/Lingo-LFC.toml b/test/Lingo-LFC.toml new file mode 100644 index 0000000..607e8e4 --- /dev/null +++ b/test/Lingo-LFC.toml @@ -0,0 +1,360 @@ +[package] +name = "LFC-Tests" +version = "0.2.0" +homepage = "https://lf-lang.org" +description = "LFC fallback tests" + +# shared properties of all binaries +[properties] + +[[app]] +target = "C" +platform = "Native" +main_reactor = "C/src/ActionDelay.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "C" +platform = "Native" +main_reactor = "C/src/ActionIsPresent.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "C" +platform = "Native" +main_reactor = "C/src/ActionWithNoReaction.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "C" +platform = "Native" +main_reactor = "C/src/After.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "C" +platform = "Native" +main_reactor = "C/src/AfterCycles.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "C" +platform = "Native" +main_reactor = "C/src/AfterOverlapped.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "C" +platform = "Native" +main_reactor = "C/src/AfterZero.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "C" +platform = "Native" +main_reactor = "C/src/Alignment.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "C" +platform = "Native" +main_reactor = "C/src/ArrayAsParameter.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "C" +platform = "Native" +main_reactor = "C/src/ArrayAsType.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "C" +platform = "Native" +main_reactor = "C/src/ArrayFree.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "C" +platform = "Native" +main_reactor = "C/src/ArrayFreeMultiple.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "C" +platform = "Native" +main_reactor = "C/src/ArrayParallel.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "C" +platform = "Native" +main_reactor = "C/src/ArrayPrint.lf" + +[app.dependencies] + +[app.properties] + + +[[app]] +target = "Python" +platform = "Native" +main_reactor = "Python/src/ActionDelay.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "Python" +platform = "Native" +main_reactor = "Python/src/ActionIsPresent.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "Python" +platform = "Native" +main_reactor = "Python/src/ActionWithNoReaction.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "Python" +platform = "Native" +main_reactor = "Python/src/After.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "Python" +platform = "Native" +main_reactor = "Python/src/AfterCycles.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "Python" +platform = "Native" +main_reactor = "Python/src/AfterOverlapped.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "Python" +platform = "Native" +main_reactor = "Python/src/ArrayAsType.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "Python" +platform = "Native" +main_reactor = "Python/src/ArrayFree.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "Python" +platform = "Native" +main_reactor = "Python/src/ArrayParallel.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "Python" +platform = "Native" +main_reactor = "Python/src/ArrayPrint.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "Rust" +platform = "Native" +main_reactor = "Rust/src/ActionDelay.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "Rust" +platform = "Native" +main_reactor = "Rust/src/ActionImplicitDelay.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "Rust" +platform = "Native" +main_reactor = "Rust/src/ActionIsPresent.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "Rust" +platform = "Native" +main_reactor = "Rust/src/ActionIsPresentDouble.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "Rust" +platform = "Native" +main_reactor = "Rust/src/ActionScheduleMicrostep.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "Rust" +platform = "Native" +main_reactor = "Rust/src/ActionValues.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "Rust" +platform = "Native" +main_reactor = "Rust/src/ActionValuesCleanup.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "Rust" +platform = "Native" +main_reactor = "Rust/src/CompositionInitializationOrder.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "Rust" +platform = "Native" +main_reactor = "Rust/src/CompositionWithPorts.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "Rust" +platform = "Native" +main_reactor = "Rust/src/CtorParamDefault.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "Rust" +platform = "Native" +main_reactor = "Rust/src/CtorParamMixed.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "Rust" +platform = "Native" +main_reactor = "Rust/src/CtorParamSimple.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "Rust" +platform = "Native" +main_reactor = "Rust/src/DependencyOnChildPort.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "Rust" +platform = "Native" +main_reactor = "Rust/src/DependencyThroughChildPort.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "Rust" +platform = "Native" +main_reactor = "Rust/src/DependencyUseAccessible.lf" + +[app.dependencies] + +[app.properties] diff --git a/test/Lingo-TypeScript.toml b/test/Lingo-TypeScript.toml new file mode 100644 index 0000000..ff24a60 --- /dev/null +++ b/test/Lingo-TypeScript.toml @@ -0,0 +1,1071 @@ +[package] +name = "TypeScript-Tests" +version = "0.2.0" +homepage = "https://lf-lang.org" +description = "All TypeScript Lingua-Franca Unit Tests" + +# shared properties of all binaries +[properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/ActionDelay.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/ActionWithNoReaction.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/After.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/ArrayAsType.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/ArrayPrint.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/ArrayScale.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/Composition.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/CompositionAfter.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/CountTest.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/DanglingOutput.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/Deadline.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/DeadlineHandledAbove.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/DelayInt.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/DelayedAction.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/DelayedReaction.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/Determinism.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/DoubleInvocation.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/DoubleReaction.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/DoubleTrigger.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/FloatLiteral.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/Gain.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/GetTime.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/Hello.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/HelloWorld.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/Hierarchy.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/Hierarchy2.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/Import.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/Microsteps.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/Minimal.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/MultipleContained.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/NativeListsAndTimes.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/ParameterizedState.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/PeriodicDesugared.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/PhysicalConnection.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/Preamble.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/ReadOutputOfContainedReactor.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/Schedule.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/ScheduleLogicalAction.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/SendingInside.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/SendingInside2.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/SendsPointerTest.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/SimpleDeadline.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/SimpleImport.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/SlowingClock.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/SlowingClockPhysical.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/Stop.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/Stride.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/StructAsState.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/StructAsType.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/StructAsTypeDirect.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/StructPrint.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/StructScale.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/TestForPreviousOutput.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/TimeLimit.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/TimeState.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/Wcet.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/concurrent/AsyncCallback.lf" + +[app.dependencies] + +[app.properties] + +#[[app]] +#target = "TypeScript" +#platform = "Native" +#main_reactor = "TypeScript/src/docker/HelloWorldContainerized.lf" +# +#[app.dependencies] +# +#[app.properties] +# +#[[app]] +#target = "TypeScript" +#platform = "Native" +#main_reactor = "TypeScript/src/docker/federated/DistributedCountContainerized.lf" +# +#[app.dependencies] +# +#[app.properties] +# +#[[app]] +#target = "TypeScript" +#platform = "Native" +#main_reactor = "TypeScript/src/federated/ChainWithDelay.lf" +# +#[app.dependencies] +# +#[app.properties] +# +#[[app]] +#target = "TypeScript" +#platform = "Native" +#main_reactor = "TypeScript/src/federated/DistributedCount.lf" +# +#[app.dependencies] +# +#[app.properties] +# +#[[app]] +#target = "TypeScript" +#platform = "Native" +#main_reactor = "TypeScript/src/federated/DistributedCountPhysical.lf" +# +#[app.dependencies] +# +#[app.properties] +# +#[[app]] +#target = "TypeScript" +#platform = "Native" +#main_reactor = "TypeScript/src/federated/DistributedCountPhysicalAfterDelay.lf" +# +#[app.dependencies] +# +#[app.properties] +# +#[[app]] +#target = "TypeScript" +#platform = "Native" +#main_reactor = "TypeScript/src/federated/DistributedDoublePort.lf" +# +#[app.dependencies] +# +#[app.properties] +# +#[[app]] +#target = "TypeScript" +#platform = "Native" +#main_reactor = "TypeScript/src/federated/DistributedLoopedAction.lf" +# +#[app.dependencies] +# +#[app.properties] +# +#[[app]] +#target = "TypeScript" +#platform = "Native" +#main_reactor = "TypeScript/src/federated/DistributedLoopedPhysicalAction.lf" +# +#[app.dependencies] +# +#[app.properties] +# +#[[app]] +#target = "TypeScript" +#platform = "Native" +#main_reactor = "TypeScript/src/federated/DistributedStop.lf" +# +#[app.dependencies] +# +#[app.properties] +# +#[[app]] +#target = "TypeScript" +#platform = "Native" +#main_reactor = "TypeScript/src/federated/DistributedStopZero.lf" +# +#[app.dependencies] +# +#[app.properties] +# +#[[app]] +#target = "TypeScript" +#platform = "Native" +#main_reactor = "TypeScript/src/federated/HelloDistributed.lf" +# +#[app.dependencies] +# +#[app.properties] +# +#[[app]] +#target = "TypeScript" +#platform = "Native" +#main_reactor = "TypeScript/src/federated/LoopDistributedCentralized.lf" +# +#[app.dependencies] +# +#[app.properties] +# +#[[app]] +#target = "TypeScript" +#platform = "Native" +#main_reactor = "TypeScript/src/federated/LoopDistributedDouble.lf" +# +#[app.dependencies] +# +#[app.properties] +# +#[[app]] +#target = "TypeScript" +#platform = "Native" +#main_reactor = "TypeScript/src/federated/PingPongDistributed.lf" +# +#[app.dependencies] +# +#[app.properties] +# +#[[app]] +#target = "TypeScript" +#platform = "Native" +#main_reactor = "TypeScript/src/federated/PingPongDistributedPhysical.lf" +# +#[app.dependencies] +# +#[app.properties] +# +#[[app]] +#target = "TypeScript" +#platform = "Native" +#main_reactor = "TypeScript/src/federated/SimpleFederated.lf" +# +#[app.dependencies] +# +#[app.properties] +# +#[[app]] +#target = "TypeScript" +#platform = "Native" +#main_reactor = "TypeScript/src/federated/SpuriousDependency.lf" +# +#[app.dependencies] +# +#[app.properties] +# +#[[app]] +#target = "TypeScript" +#platform = "Native" +#main_reactor = "TypeScript/src/federated/StopAtShutdown.lf" +# +#[app.dependencies] +# +#[app.properties] +# +#[[app]] +#target = "TypeScript" +#platform = "Native" +#main_reactor = "TypeScript/src/federated/TopLevelArtifacts.lf" +# +#[app.dependencies] +# +#[app.properties] +# +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/multiport/BankMulticast.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/multiport/BankMultiportToReaction.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/multiport/BankReactionsInContainer.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/multiport/BankSelfBroadcast.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/multiport/BankToBank.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/multiport/BankToBankMultiport.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/multiport/BankToBankMultiportAfter.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/multiport/BankToMultiport.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/multiport/BankToReaction.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/multiport/Broadcast.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/multiport/BroadcastAfter.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/multiport/BroadcastMultipleAfter.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/multiport/FullyConnected.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/multiport/MultiportFromBank.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/multiport/MultiportFromBankHierarchy.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/multiport/MultiportFromBankHierarchyAfter.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/multiport/MultiportFromHierarchy.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/multiport/MultiportFromReaction.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/multiport/MultiportIn.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/multiport/MultiportInParameterized.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/multiport/MultiportMutableInput.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/multiport/MultiportMutableInputArray.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/multiport/MultiportOut.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/multiport/MultiportToBank.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/multiport/MultiportToBankAfter.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/multiport/MultiportToBankDouble.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/multiport/MultiportToBankHierarchy.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/multiport/MultiportToHierarchy.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/multiport/MultiportToMultiport.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/multiport/MultiportToMultiport2.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/multiport/MultiportToMultiport2After.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/multiport/MultiportToMultiportArray.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/multiport/MultiportToMultiportParameter.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/multiport/MultiportToPort.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/multiport/MultiportToReaction.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/multiport/NestedBanks.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/multiport/PipelineAfter.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/multiport/ReactionToContainedBank.lf" + +[app.dependencies] + +[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/multiport/ReactionsToNested.lf" + +[app.dependencies] + +[app.properties] + +#[[app]] +#target = "TypeScript" +#platform = "Native" +#main_reactor = "TypeScript/src/serialization/ProtoNoPacking.lf" +# +#[app.dependencies] +# +#[app.properties] + +[[app]] +target = "TypeScript" +platform = "Native" +main_reactor = "TypeScript/src/target/AfterNoTypes.lf" + +[app.dependencies] + +[app.properties] +