Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preliminary path.relative workaround #1399

Merged
merged 2 commits into from
Jul 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ jobs:
exit 1
fi
npm test
- name: Test browser build
run: node tests/browser-asc
test-windows:
name: "Compiler (Windows, node current)"
runs-on: windows-latest
Expand All @@ -87,6 +89,8 @@ jobs:
run: npm run build
- name: Test distribution
run: npm test
- name: Test browser build
run: node tests/browser-asc
test-macos:
name: "Compiler (MacOS, node current)"
runs-on: macos-latest
Expand All @@ -106,6 +110,8 @@ jobs:
run: npm run build
- name: Test distribution
run: npm test
- name: Test browser build
run: node tests/browser-asc
test-features:
name: "Features"
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions cli/asc.js
Original file line number Diff line number Diff line change
Expand Up @@ -351,8 +351,11 @@ exports.main = function main(argv, options, callback) {

// returns a relative path from baseDir
function makeRelative(arg) {
// FIXME: see https://github.com/AssemblyScript/assemblyscript/issues/1398
if (baseDir === ".") return arg;
return path.relative(baseDir, arg);
}

// postprocess we need to get absolute file locations argv
argv = unique(argv.map(resolveBasedir)).map(makeRelative);

Expand Down