Skip to content

Commit

Permalink
Merge pull request #2424 from lf-lang/fix-windows
Browse files Browse the repository at this point in the history
Fix windows
  • Loading branch information
edwardalee authored Oct 15, 2024
2 parents a881e99 + 3da4aae commit 26674cf
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 34 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ts-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ jobs:
- name: Prepare build environment
uses: ./.github/actions/prepare-build-env
- name: Setup Node.js environment
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 22
- name: Install pnpm
run: npm i -g pnpm
- name: Install coreutils (macOS)
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/org/lflang/util/ImportUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ public class ImportUtil {
* names.
*/
public static String buildPackageURI(String uriStr, Resource resource) {
Path rootPath = Paths.get(resource.getURI().toString()).toAbsolutePath();

Path rootPath = FileUtil.toPath(resource);
Path uriPath = Paths.get(uriStr.trim());

if (uriPath.getNameCount() < 2) {
Expand Down
11 changes: 5 additions & 6 deletions core/src/main/resources/lib/ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,12 @@
"@types/command-line-usage": "^5.0.2",
"@types/google-protobuf": "^3.7.4",
"@types/microtime": "^2.1.0",
"@types/node": "^18.14.2",
"@typescript-eslint/eslint-plugin": "5.33.0",
"@typescript-eslint/parser": "^5.8.1",
"eslint": "^8.5.0",
"typescript": "~4.8.2",
"@types/node": "^22.5.0",
"eslint-config-prettier": "^9.0.0",
"eslint-config-standard-with-typescript": "^43.0.1",
"typescript": "^5.1.6",
"ts-protoc-gen": "^0.15.0",
"rimraf": "^3.0.2"
"rimraf": "^6.0.1"
},
"scripts": {
"build": "npx rimraf dist && npx tsc --outDir dist"
Expand Down
1 change: 0 additions & 1 deletion core/src/main/resources/lib/ts/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"target": "esnext",
"module": "CommonJS",
"types": ["node", "@lf-lang/reactor-ts", "microtime", "command-line-args", "command-line-usage"],
"typeRoots": ["./node_modules/@types/", "./node_modules/@lf-lang/reactor-ts/src/core/@types/"],
"esModuleInterop": true,
"isolatedModules": true,
"lib": ["esnext", "dom"],
Expand Down
4 changes: 3 additions & 1 deletion test/C/src/Mutable.lf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ reactor S(width: int = 4) {
}

reactor R(width: int = 4) {
mutable input[width] in: int
// Pathetically, the Windows C compiler doesn't support arrays on the stack with a variable size.
// So we have to give a constant here instead of the parameter width.
mutable input[2] in: int
output[width] out: int

reaction(in) -> out {=
Expand Down
4 changes: 3 additions & 1 deletion test/C/src/token/MutableToken.lf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ preamble {=
=}

reactor R(width: int = 4) {
mutable input[width] in: int_array_t*
// Pathetically, the Windows C compiler doesn't support arrays on the stack with a variable size.
// So we have to give a constant here instead of the parameter width.
mutable input[2] in: int_array_t*
output[width] out: int_array_t*

reaction(in) -> out {=
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Test the new import statement for Lingo downloaded packages with the import path enclosed in angle brackets
# Version 1: The LF file is located in "src".
target Python {
timeout: 2 sec
}
Expand Down
21 changes: 0 additions & 21 deletions test/Python/src/lingo_imports/FederatedTestImportPackages.lf

This file was deleted.

0 comments on commit 26674cf

Please sign in to comment.