Refactor gui/src/rust/ide to two app/gui and app/ide-desktop (#3157)

This commit is contained in:
Adam Obuchowicz 2021-11-16 10:04:56 +01:00 committed by GitHub
parent 753f787a6f
commit bb3b145af5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
333 changed files with 45208 additions and 22319 deletions

View File

@ -1,4 +1,11 @@
[build]
target-dir = "target/rust/"
rustflags = []
[target.wasm32-unknown-unknown]
rustflags = [
# Increas the stack size from 1MB to 2MB. This is required to avoid running out of stack space
# in debug builds. The error is reported as `RuntimeError: memory access out of bounds`.
"-C",
"link-args=-z stack-size=2097152",
]

View File

@ -11,9 +11,6 @@ name: GUI CI
- stable
pull_request: {}
workflow_dispatch: {}
defaults:
run:
working-directory: gui
jobs:
info:
name: Build Info
@ -274,7 +271,7 @@ jobs:
uses: actions/upload-artifact@v2
with:
name: ide-wasm
path: gui/dist/wasm
path: dist/wasm
package:
name: Build package
runs-on: ${{ matrix.runner }}
@ -350,7 +347,7 @@ jobs:
uses: actions/download-artifact@v2
with:
name: ide-wasm
path: gui/dist/wasm
path: dist/wasm
- name: Build Package
run: node ./run dist --no-rust --skip-version-validation
shell: bash
@ -367,14 +364,14 @@ jobs:
uses: actions/upload-artifact@v2
with:
name: content
path: gui/dist/content
path: dist/content
if: runner.os == 'Linux'
- name: Upload Artifacts (macOS, dmg)
uses: actions/upload-artifact@v1
with:
name: enso-mac-${{fromJson(steps.changelog.outputs.content).version}}.dmg
path: >-
gui/dist/client/enso-mac-${{fromJson(steps.changelog.outputs.content).version}}.dmg
dist/client/enso-mac-${{fromJson(steps.changelog.outputs.content).version}}.dmg
if: runner.os == 'macOS'
- name: Upload Artifacts (macOS, dmg.sha256)
uses: actions/upload-artifact@v1
@ -382,14 +379,14 @@ jobs:
name: >-
enso-mac-${{fromJson(steps.changelog.outputs.content).version}}.dmg.sha256
path: >-
gui/dist/client/enso-mac-${{fromJson(steps.changelog.outputs.content).version}}.dmg.sha256
dist/client/enso-mac-${{fromJson(steps.changelog.outputs.content).version}}.dmg.sha256
if: runner.os == 'macOS'
- name: Upload Artifacts (Windows, exe)
uses: actions/upload-artifact@v1
with:
name: enso-win-${{fromJson(steps.changelog.outputs.content).version}}.exe
path: >-
gui/dist/client/enso-win-${{fromJson(steps.changelog.outputs.content).version}}.exe
dist/client/enso-win-${{fromJson(steps.changelog.outputs.content).version}}.exe
if: runner.os == 'Windows'
- name: Upload Artifacts (Windows, exe.sha256)
uses: actions/upload-artifact@v1
@ -397,7 +394,7 @@ jobs:
name: >-
enso-win-${{fromJson(steps.changelog.outputs.content).version}}.exe.sha256
path: >-
gui/dist/client/enso-win-${{fromJson(steps.changelog.outputs.content).version}}.exe.sha256
dist/client/enso-win-${{fromJson(steps.changelog.outputs.content).version}}.exe.sha256
if: runner.os == 'Windows'
- name: Upload Artifacts (Linux, AppImage)
uses: actions/upload-artifact@v1
@ -405,7 +402,7 @@ jobs:
name: >-
enso-linux-${{fromJson(steps.changelog.outputs.content).version}}.AppImage
path: >-
gui/dist/client/enso-linux-${{fromJson(steps.changelog.outputs.content).version}}.AppImage
dist/client/enso-linux-${{fromJson(steps.changelog.outputs.content).version}}.AppImage
if: runner.os == 'Linux'
- name: Upload Artifacts (Linux, AppImage.sha256)
uses: actions/upload-artifact@v1
@ -413,7 +410,7 @@ jobs:
name: >-
enso-linux-${{fromJson(steps.changelog.outputs.content).version}}.AppImage.sha256
path: >-
gui/dist/client/enso-linux-${{fromJson(steps.changelog.outputs.content).version}}.AppImage.sha256
dist/client/enso-linux-${{fromJson(steps.changelog.outputs.content).version}}.AppImage.sha256
if: runner.os == 'Linux'
needs:
- build_wasm

99
Cargo.lock generated
View File

@ -823,6 +823,7 @@ dependencies = [
"enso-logger",
"enso-prelude",
"ensogl",
"semver 1.0.4",
]
[[package]]
@ -882,6 +883,55 @@ dependencies = [
"serde",
]
[[package]]
name = "enso-gui"
version = "0.1.0"
dependencies = [
"analytics",
"ast",
"bimap",
"console_error_panic_hook",
"double-representation",
"engine-protocol",
"enso-callback",
"enso-config",
"enso-data",
"enso-frp",
"enso-logger",
"enso-prelude",
"enso-shapely",
"enso-web",
"ensogl",
"ensogl-drop-manager",
"ensogl-examples",
"ensogl-gui-component",
"ensogl-hardcoded-theme",
"ensogl-text",
"ensogl-text-msdf-sys",
"failure",
"flo_stream",
"futures 0.3.17",
"fuzzly",
"ide-view",
"itertools 0.10.1",
"js-sys",
"json-rpc",
"mockall",
"nalgebra 0.26.2",
"parser",
"regex",
"semver 1.0.4",
"serde",
"serde_json",
"sha3",
"span-tree",
"uuid",
"wasm-bindgen",
"wasm-bindgen-test 0.3.8",
"web-sys",
"websocket",
]
[[package]]
name = "enso-lazy-reader"
version = "0.2.0"
@ -1699,55 +1749,6 @@ dependencies = [
"tokio-tls 0.3.1",
]
[[package]]
name = "ide"
version = "0.1.0"
dependencies = [
"analytics",
"ast",
"bimap",
"console_error_panic_hook",
"double-representation",
"engine-protocol",
"enso-callback",
"enso-config",
"enso-data",
"enso-frp",
"enso-logger",
"enso-prelude",
"enso-shapely",
"enso-web",
"ensogl",
"ensogl-drop-manager",
"ensogl-examples",
"ensogl-gui-component",
"ensogl-hardcoded-theme",
"ensogl-text",
"ensogl-text-msdf-sys",
"failure",
"flo_stream",
"futures 0.3.17",
"fuzzly",
"ide-view",
"itertools 0.10.1",
"js-sys",
"json-rpc",
"mockall",
"nalgebra 0.26.2",
"parser",
"regex",
"semver 1.0.4",
"serde",
"serde_json",
"sha3",
"span-tree",
"uuid",
"wasm-bindgen",
"wasm-bindgen-test 0.3.8",
"web-sys",
"websocket",
]
[[package]]
name = "ide-view"
version = "0.1.0"

View File

@ -1,20 +1,21 @@
[workspace]
members = [
"gui/src/rust/ide",
"gui/src/rust/ide/controller",
"gui/src/rust/ide/controller/double-representation",
"gui/src/rust/ide/controller/engine-model",
"gui/src/rust/ide/controller/engine-protocol",
"gui/src/rust/ide/lib/config",
"gui/src/rust/ide/lib/ast/impl",
"gui/src/rust/ide/lib/ast/macros",
"gui/src/rust/ide/lib/parser",
"gui/src/rust/ide/lib/span-tree",
"gui/src/rust/ide/lib/span-tree/example",
"gui/src/rust/ide/view",
"gui/src/rust/ide/view/graph-editor",
"gui/src/rust/test",
"app/gui",
"app/gui/controller",
"app/gui/controller/double-representation",
"app/gui/controller/engine-model",
"app/gui/controller/engine-protocol",
"app/gui/analytics",
"app/gui/config",
"app/gui/language/ast/impl",
"app/gui/language/ast/macros",
"app/gui/language/parser",
"app/gui/language/span-tree",
"app/gui/language/span-tree/example",
"app/gui/view",
"app/gui/view/graph-editor",
"build/rust-scripts",
"lib/rust/automata",
"lib/rust/build-utils",
"lib/rust/callback",

View File

@ -1,5 +1,5 @@
[package]
name = "ide"
name = "enso-gui"
version = "0.1.0"
authors = ["Enso Team <contact@enso.org>"]
edition = "2018"
@ -8,30 +8,30 @@ edition = "2018"
crate-type = ["cdylib", "rlib"]
[dependencies]
analytics = { version = "0.1.0", path = "lib/analytics" }
analytics = { version = "0.1.0", path = "analytics" }
double-representation = { version = "0.1.0", path = "controller/double-representation" }
enso-config = { path = "lib/config" }
enso-callback = { path = "../../../../lib/rust/callback" }
enso-data = { path = "../../../../lib/rust/data"}
enso-frp = { path = "../../../../lib/rust/frp" }
enso-logger = { path = "../../../../lib/rust/logger"}
enso-prelude = { path = "../../../../lib/rust/prelude"}
enso-shapely = { path = "../../../../lib/rust/shapely/impl"}
enso-web = { path = "../../../../lib/rust/web" }
ensogl = { path = "../../../../lib/rust/ensogl" }
ensogl-examples = { path = "../../../../lib/rust/ensogl/example" }
ensogl-gui-component = { path = "../../../../lib/rust/ensogl/component/gui" }
ensogl-text = { path = "../../../../lib/rust/ensogl/component/text" }
ensogl-text-msdf-sys = { path = "../../../../lib/rust/ensogl/component/text/msdf-sys" }
ensogl-hardcoded-theme = { path = "../../../../lib/rust/ensogl/app/theme/hardcoded" }
ensogl-drop-manager = { path = "../../../../lib/rust/ensogl/component/drop-manager" }
fuzzly = { path = "../../../../lib/rust/fuzzly" }
ast = { path = "lib/ast/impl" }
enso-config = { path = "config" }
enso-callback = { path = "../../lib/rust/callback" }
enso-data = { path = "../../lib/rust/data"}
enso-frp = { path = "../../lib/rust/frp" }
enso-logger = { path = "../../lib/rust/logger"}
enso-prelude = { path = "../../lib/rust/prelude"}
enso-shapely = { path = "../../lib/rust/shapely/impl"}
enso-web = { path = "../../lib/rust/web" }
ensogl = { path = "../../lib/rust/ensogl" }
ensogl-examples = { path = "../../lib/rust/ensogl/example" }
ensogl-gui-component = { path = "../../lib/rust/ensogl/component/gui" }
ensogl-text = { path = "../../lib/rust/ensogl/component/text" }
ensogl-text-msdf-sys = { path = "../../lib/rust/ensogl/component/text/msdf-sys" }
ensogl-hardcoded-theme = { path = "../../lib/rust/ensogl/app/theme/hardcoded" }
ensogl-drop-manager = { path = "../../lib/rust/ensogl/component/drop-manager" }
fuzzly = { path = "../../lib/rust/fuzzly" }
ast = { path = "language/ast/impl" }
ide-view = { path = "view" }
engine-protocol = { path = "controller/engine-protocol" }
json-rpc = { path = "../../../../lib/rust/json-rpc" }
parser = { path = "lib/parser" }
span-tree = { path = "lib/span-tree" }
json-rpc = { path = "../../lib/rust/json-rpc" }
parser = { path = "language/parser" }
span-tree = { path = "language/span-tree" }
bimap = { version = "0.4.0" }
console_error_panic_hook = { version = "0.1.6" }
failure = { version = "0.1.6" }

View File

@ -10,3 +10,14 @@ windowAppScopeConfigName: "config"
# The configuration object nested inside of the `windowAppScopeName` object containing theming
# utilities and allowing for runtime theme modification.
windowAppScopeThemeName: "theme"
# TODO [ao] add description here.
minimumSupportedVersion": "2.0.0-alpha.6"
# The minimum engine version supported by the application. The projects opened with the older versions
# will have the "Unsupported engine version" message displayed.
engineVersionSupported: "0.2.31"
# The minimum language edition supported by the application. It will be displayed as edition user
# should put in their package.yaml file to have project compatible with the IDE.
languageEditionSupported: "2021.19"

14
app/gui/config/Cargo.toml Normal file
View File

@ -0,0 +1,14 @@
[package]
name = "enso-config"
version = "0.1.0"
authors = ["Enso Team <contact@enso.org>"]
edition = "2018"
[dependencies]
ensogl = { path = "../../../lib/rust/ensogl" }
enso-prelude = { path = "../../../lib/rust/prelude"}
enso-logger = { path = "../../../lib/rust/logger" }
semver = "1.0.0"
[build-dependencies]
config-reader = { version = "0.1.0", path = "../../../lib/rust/config-reader" }

View File

@ -1,4 +1,4 @@
const CONFIG_PATH: &str = "../../../../config.yaml";
const CONFIG_PATH: &str = "../config.yaml";
fn main() {
println!("cargo:rerun-if-changed={}", CONFIG_PATH);

View File

@ -23,6 +23,9 @@ include!(concat!(env!("OUT_DIR"), "/config.rs"));
pub use generated::*;
pub fn engine_version_requirement() -> semver::VersionReq {
semver::VersionReq::parse(&format!("^{}", engine_version_supported)).unwrap()
}
// ============

View File

@ -8,12 +8,12 @@ edition = "2018"
crate-type = ["cdylib", "rlib"]
[dependencies]
ast = { version = "0.1.0", path = "../../lib/ast/impl" }
ast = { version = "0.1.0", path = "../../language/ast/impl" }
engine-protocol = { version = "0.1.0", path = "../engine-protocol" }
parser = { version = "0.1.0", path = "../../lib/parser" }
enso-data = { path = "../../../../../../lib/rust/data"}
enso-logger = { path = "../../../../../../lib/rust/logger"}
enso-prelude = { path = "../../../../../../lib/rust/prelude"}
parser = { version = "0.1.0", path = "../../language/parser" }
enso-data = { path = "../../../../lib/rust/data"}
enso-logger = { path = "../../../../lib/rust/logger"}
enso-prelude = { path = "../../../../lib/rust/prelude"}
failure = { version = "0.1.6" }
itertools = { version = "0.10.0" }
serde = { version = "1.0", features = ["derive"] }

View File

@ -8,11 +8,11 @@ edition = "2018"
crate-type = ["cdylib", "rlib"]
[dependencies]
enso-data = { path = "../../../../../../lib/rust/data"}
enso-logger = { path = "../../../../../../lib/rust/logger"}
enso-prelude = { path = "../../../../../../lib/rust/prelude"}
enso-shapely = { path = "../../../../../../lib/rust/shapely/impl"}
json-rpc = { path = "../../../../../../lib/rust/json-rpc" }
enso-data = { path = "../../../../lib/rust/data"}
enso-logger = { path = "../../../../lib/rust/logger"}
enso-prelude = { path = "../../../../lib/rust/prelude"}
enso-shapely = { path = "../../../../lib/rust/shapely/impl"}
json-rpc = { path = "../../../../lib/rust/json-rpc" }
chrono = { version = "0.4", features = ["serde"] }
failure = { version = "0.1.8" }
flatbuffers = { version = "0.5" }
@ -26,10 +26,10 @@ uuid = { version = "0.8", features = ["serde", "v4", "wasm-bindgen"] }
[dev-dependencies]
wasm-bindgen-test = { version = "0.3.8" }
enso-web = { path = "../../../../../../lib/rust/web" }
enso-web = { path = "../../../../lib/rust/web" }
[build-dependencies]
enso-build-utilities = { path = "../../../../../../lib/rust/build-utils" }
enso-build-utilities = { path = "../../../../lib/rust/build-utils" }
bytes = { version = "0.5.4" }
flatc-rust = { version = "0.1.2" }
futures = { version = "0.3.1" }

View File

Before

Width:  |  Height:  |  Size: 273 B

After

Width:  |  Height:  |  Size: 273 B

View File

Before

Width:  |  Height:  |  Size: 278 B

After

Width:  |  Height:  |  Size: 278 B

View File

Before

Width:  |  Height:  |  Size: 288 B

After

Width:  |  Height:  |  Size: 288 B

View File

Before

Width:  |  Height:  |  Size: 279 B

After

Width:  |  Height:  |  Size: 279 B

View File

@ -17,6 +17,6 @@ serde_json = { version = "1.0" }
shrinkwraprs = { version = "0.2.1" }
uuid = { version = "0.8.1", features = ["serde", "v4", "wasm-bindgen"] }
ast-macros = { path = "../macros" }
enso-data = { path = "../../../../../../../lib/rust/data"}
enso-prelude = { path = "../../../../../../../lib/rust/prelude"}
enso-shapely = { path = "../../../../../../../lib/rust/shapely/impl"}
enso-data = { path = "../../../../../lib/rust/data"}
enso-prelude = { path = "../../../../../lib/rust/prelude"}
enso-shapely = { path = "../../../../../lib/rust/shapely/impl"}

View File

@ -14,8 +14,8 @@ default = []
proc-macro2 = "1.0"
quote = "1.0"
Inflector = "0.11.4"
enso-prelude = { path = "../../../../../../../lib/rust/prelude"}
enso-macro-utils = { path = "../../../../../../../lib/rust/macro-utils"}
enso-prelude = { path = "../../../../../lib/rust/prelude"}
enso-macro-utils = { path = "../../../../../lib/rust/macro-utils"}
[dependencies.syn]
version = "1.0"

2
app/gui/language/parser/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
# Downloaded parser artifacts
pkg

View File

@ -10,8 +10,8 @@ crate-type = ["cdylib", "rlib"]
[dependencies]
ast = { path = "../ast/impl" }
enso-data = { path = "../../../../../../lib/rust/data"}
enso-prelude = { path = "../../../../../../lib/rust/prelude", features = ["serde", "serde_json"] }
enso-data = { path = "../../../../lib/rust/data"}
enso-prelude = { path = "../../../../lib/rust/prelude", features = ["serde", "serde_json"] }
console_error_panic_hook = { version = "0.1.6" }
failure = { version = "0.1" }
js-sys = { version = "0.3.28" }
@ -26,7 +26,7 @@ wasm-bindgen = { version = "=0.2.58" }
wasm-bindgen-test = { version = "0.3.8" }
[build-dependencies]
enso-build-utilities = { path = "../../../../../../lib/rust/build-utils" }
enso-build-utilities = { path = "../../../../lib/rust/build-utils" }
bytes = { version = "0.5.4" }
futures = { version = "0.3.1" }
reqwest = { version = "0.10.1" }

Some files were not shown because too many files have changed in this diff Show More