Skip to content

Commit e915fa0

Browse files
committed
remove symlinks
1 parent d9e5259 commit e915fa0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+14
-84
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,3 +98,4 @@ tests/analysis_tests/**/*.bs.js
9898

9999
# package tarballs
100100
package.tgz
101+
*.exe

cli/common/bins.js

Lines changed: 11 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
// @ts-check
22

3-
import * as fs from "node:fs";
4-
53
/**
6-
* @import {BinaryPaths} from "@rescript/linux-x64"
74
* @typedef {import("@rescript/linux-x64")} BinaryModuleExports
85
*/
96

@@ -17,29 +14,15 @@ try {
1714
throw new Error(`Platform ${target} is not supported!`);
1815
}
1916

20-
const binPaths = mod.binPaths;
21-
// Compiler use symbolic links in the development process
22-
if (fs.lstatSync(binPaths.rescript_exe).isSymbolicLink()) {
23-
for (const [key, binPath] of Object.entries(binPaths)) {
24-
try {
25-
binPaths[/** @type {keyof BinaryPaths} */ (key)] =
26-
fs.realpathSync(binPath);
27-
} catch {
28-
// Cannot populate the realpath of a binary, some tests may fails.
29-
//
30-
// But we don't report error here,
31-
// so pass even some binaries are not built yet.
32-
}
33-
}
34-
}
35-
36-
export const platformDir = mod.binDir;
3717
export const {
38-
bsb_helper_exe,
39-
bsc_exe,
40-
ninja_exe,
41-
rescript_editor_analysis_exe,
42-
rescript_tools_exe,
43-
rescript_exe,
44-
rewatch_exe,
45-
} = binPaths;
18+
binDir,
19+
binPaths: {
20+
bsb_helper_exe,
21+
bsc_exe,
22+
ninja_exe,
23+
rescript_editor_analysis_exe,
24+
rescript_tools_exe,
25+
rescript_exe,
26+
rewatch_exe,
27+
},
28+
} = mod;

lib_dev/paths.js

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,6 @@ import * as path from "node:path";
77
*/
88
export const projectDir = path.resolve(import.meta.dirname, "..");
99

10-
/**
11-
* For compatibility reasons, if the architecture is x64, omit it from the bin directory name.
12-
* So we'll have "darwin", "linux" and "win32" for x64 arch,
13-
* but "darwinarm64" and "linuxarm64" for arm64 arch.
14-
* Also, we do not have Windows ARM binaries yet. But the x64 binaries do work on Windows 11 ARM.
15-
* So omit the architecture for Windows, too.
16-
*/
17-
export const platformName =
18-
process.arch === "x64" || process.platform === "win32"
19-
? process.platform
20-
: process.platform + process.arch;
21-
22-
/**
23-
* path: `<projectDir>/<platform>` (e.g. linux, darwinarm64)
24-
*/
25-
export const platformDir = path.resolve(projectDir, platformName);
26-
2710
/**
2811
* path: `<projectDir>/compiler/`
2912
*/

packages/@rescript/darwin-arm64/bin/.gitkeep

Whitespace-only changes.

packages/@rescript/darwin-arm64/bin/bsb_helper.exe

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/@rescript/darwin-arm64/bin/bsc.exe

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/@rescript/darwin-arm64/bin/ninja.exe

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/@rescript/darwin-arm64/bin/rescript-editor-analysis.exe

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/@rescript/darwin-arm64/bin/rescript-tools.exe

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/@rescript/darwin-arm64/bin/rescript.exe

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/@rescript/darwin-arm64/bin/rewatch.exe

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/@rescript/darwin-x64/bin/.gitkeep

Whitespace-only changes.

packages/@rescript/darwin-x64/bin/bsb_helper.exe

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/@rescript/darwin-x64/bin/bsc.exe

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/@rescript/darwin-x64/bin/ninja.exe

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/@rescript/darwin-x64/bin/rescript-editor-analysis.exe

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/@rescript/darwin-x64/bin/rescript-tools.exe

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/@rescript/darwin-x64/bin/rescript.exe

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/@rescript/darwin-x64/bin/rewatch.exe

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/@rescript/linux-arm64/bin/.gitkeep

Whitespace-only changes.

packages/@rescript/linux-arm64/bin/bsb_helper.exe

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/@rescript/linux-arm64/bin/bsc.exe

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/@rescript/linux-arm64/bin/ninja.exe

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/@rescript/linux-arm64/bin/rescript-editor-analysis.exe

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/@rescript/linux-arm64/bin/rescript-tools.exe

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/@rescript/linux-arm64/bin/rescript.exe

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/@rescript/linux-arm64/bin/rewatch.exe

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/@rescript/linux-x64/bin/.gitkeep

Whitespace-only changes.

packages/@rescript/linux-x64/bin/bsb_helper.exe

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/@rescript/linux-x64/bin/bsc.exe

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/@rescript/linux-x64/bin/ninja.exe

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/@rescript/linux-x64/bin/rescript-editor-analysis.exe

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/@rescript/linux-x64/bin/rescript-tools.exe

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/@rescript/linux-x64/bin/rescript.exe

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/@rescript/linux-x64/bin/rewatch.exe

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/@rescript/win32-x64/bin/.gitkeep

Whitespace-only changes.

packages/@rescript/win32-x64/bin/bsb_helper.exe

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/@rescript/win32-x64/bin/bsc.exe

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/@rescript/win32-x64/bin/ninja.exe

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/@rescript/win32-x64/bin/rescript-editor-analysis.exe

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/@rescript/win32-x64/bin/rescript-tools.exe

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/@rescript/win32-x64/bin/rescript.exe

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/@rescript/win32-x64/bin/rewatch.exe

Lines changed: 0 additions & 1 deletion
This file was deleted.

scripts/copyExes.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,17 @@
77
import * as child_process from "node:child_process";
88
import * as fs from "node:fs";
99
import * as path from "node:path";
10-
import { platformDir } from "#dev/paths";
10+
import { binDir } from "#cli/bins";
1111
import { compilerBinDir, ninjaDir, rewatchDir } from "#dev/paths";
1212

13-
fs.mkdirSync(platformDir, { recursive: true });
14-
1513
/**
1614
* @param {string} dir
1715
* @param {string} exe
1816
*/
1917
function copyExe(dir, exe) {
2018
const ext = process.platform === "win32" ? ".exe" : "";
2119
const src = path.join(dir, exe + ext);
22-
const dest = path.join(platformDir, `${exe}.exe`);
20+
const dest = path.join(binDir, `${exe}.exe`);
2321

2422
// For some reason, the copy operation fails in Windows CI if the file already exists.
2523
if (process.platform === "win32" && fs.existsSync(dest)) {

0 commit comments

Comments
 (0)