Skip to content

Commit dc898e8

Browse files
committed
Cleanups
1 parent 41f4fee commit dc898e8

File tree

7 files changed

+17
-71
lines changed

7 files changed

+17
-71
lines changed

app/electron-client/BUILD.bazel

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ esbuild(
5050
config = ":esbuild.config.mjs",
5151
define = {
5252
"process.env.ELECTRON_DEV_MODE": "false",
53-
"process.env.ENSO_IDE_VERSION": '"2025.0.0-dev"',
54-
"process.env.ENSO_IDE_COMMIT_HASH": '"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"',
5553
},
5654
entry_points = [
5755
"src/index.ts",
@@ -79,11 +77,10 @@ electron_builder_bin.electron_builder(
7977
name = "electron_builder_run",
8078
srcs = npm_link_targets() + [
8179
"package.json",
80+
":bundle",
8281
":electron-builder-config.cjs",
8382
"//:sbt_build_engine_distribution",
8483
"//:sbt_build_small_jdk",
85-
] + [
86-
":bundle",
8784
"//app/gui:dist",
8885
],
8986
args = [
@@ -95,7 +92,6 @@ electron_builder_bin.electron_builder(
9592
# Disable Node fs patching for this target to avoid readlink issues on Bazel bin symlinks.
9693
"JS_BINARY__PATCH_NODE_FS": "0",
9794
},
98-
# Run from BINDIR (default); rely on package.json "build" config.
9995
out_dirs = ["ide-dist"],
10096
visibility = ["//visibility:public"],
10197
)

app/electron-client/electron-builder-config.cjs

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,17 @@ function artifactName(version) {
55
return 'enso-${os}-${arch}-' + version + '.${ext}'
66
}
77

8-
function engineDistributionSource(version) {
9-
let platform = process.platform
10-
let arch = process.arch
11-
if (platform === 'darwin') {
12-
platform = 'macos'
13-
if (arch === 'arm64') {
14-
arch = 'aarch64'
15-
}
16-
}
17-
if (platform === 'linux' && arch === 'x64') {
18-
arch = 'amd64'
8+
function engineDistributionSource(version, platform = process.platform, arch = process.arch) {
9+
const platformMap = { darwin: 'macos' }
10+
const archMapByPlatform = {
11+
darwin: { arm64: 'aarch64' },
12+
linux: { x64: 'amd64' },
1913
}
20-
return `../../built-distribution/enso-engine-${version}-${platform}-${arch}/enso-${version}/`
14+
15+
const normalizedPlatform = platformMap[platform] ?? platform
16+
const normalizedArch = archMapByPlatform[platform]?.[arch] ?? arch
17+
18+
return `../../built-distribution/enso-engine-${version}-${normalizedPlatform}-${normalizedArch}/enso-${version}/`
2119
}
2220

2321
function engineDistributionTarget(version) {
@@ -58,10 +56,10 @@ module.exports = {
5856
appId: 'org.enso',
5957
productName: 'Enso',
6058
extraMetadata: {
61-
version: '2025.3.0-dev',
59+
version: '0.0.0-dev',
6260
installer: {},
6361
},
64-
artifactName: artifactName('2025.3.0-dev'),
62+
artifactName: artifactName('0.0.0-dev'),
6563
protocols: [
6664
{
6765
name: 'Enso url',
@@ -117,8 +115,8 @@ module.exports = {
117115
directories: {
118116
output: 'ide-dist',
119117
},
118+
// Providing empty beforeBuild hook and using npmRebuild: true to prevent electron-builder from trying to install dependencies.
120119
beforeBuild: function () {
121-
// We handle node_modules manually.
122120
return false
123121
},
124122
npmRebuild: true,

app/electron-client/electron-builder-config.json

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

app/electron-client/pre-electron-builder.cjs

Lines changed: 0 additions & 40 deletions
This file was deleted.

app/table-expression/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ lezer_generator_bin.lezer_generator(
5757
],
5858
chdir = package_name(),
5959
env = {
60-
# Disable Node fs patching on Windows to avoid EPERM on Bazel symlinked outputs.
60+
# Disable Node fs patching to avoid EPERM on Bazel symlinked outputs on Windows.
6161
"JS_BINARY__PATCH_NODE_FS": "0",
6262
},
6363
visibility = ["//visibility:public"],

bazel_scripts/stamp.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ fi
1616

1717

1818
echo "STABLE_IDE_VERSION $IDE_VERSION"
19-
echo "STABLE_IDE_COMMIT_HASH $IDE_COMMIT_HASH"
19+
echo "STABLE_IDE_COMMIT_HASH $IDE_COMMIT_HASH"

eslint.config.mjs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,6 @@ const config = [
191191
'**/*.json',
192192
'app/rust-ffi/pkg/',
193193
'app/electron-client/electron-builder-config.cjs',
194-
'app/electron-client/create-build-info.cjs',
195194
],
196195
},
197196
{
@@ -220,8 +219,8 @@ const config = [
220219
'app/ydoc-shared/vitest.config.ts',
221220
'app/project-manager-shim/scripts/*.js',
222221
'app/ide-desktop/icons/src/index.js',
223-
'app/electron-client/pre-electron-builder.cjs',
224222
'app/electron-client/electron-builder-config.cjs',
223+
'app/electron-client/create-build-info.mjs',
225224
],
226225
},
227226
},
@@ -559,12 +558,6 @@ const config = [
559558
{
560559
files: ['**/*.js', '**/*.jsx', '**/*.cjs', '**/*.mjs'],
561560
ignores: ['**/build.mjs'],
562-
languageOptions: {
563-
parserOptions: {
564-
// Avoid TS project service errors for plain JS/CJS files.
565-
projectService: false,
566-
},
567-
},
568561
rules: {
569562
'@typescript-eslint/no-var-requires': 'off',
570563
// Parameter types must be specified using JSDoc in JS files.

0 commit comments

Comments
 (0)