Commit graph

106 commits

Author SHA1 Message Date
a-kenji
bb2b8ddc82 fix(ci): move nix build -> nix-develop
This will trigger the nix build workflow, only on changes in the nix
files.

- This won't generate precompiled artifacts for any person wanting to
  use them from the main branch anymore.

  Also PR's that pass CI won't be able to be run with:
  ```
  nix run github:zellij-org/zellij/pr#
  ```
  without compilation anymore on any linux, or darwin system.
2022-12-12 08:19:46 +01:00
dependabot[bot]
c2a6156a6b
build(deps): bump DeterminateSystems/update-flake-lock from 14 to 15 (#1982)
Bumps [DeterminateSystems/update-flake-lock](https://github.com/DeterminateSystems/update-flake-lock) from 14 to 15.
- [Release notes](https://github.com/DeterminateSystems/update-flake-lock/releases)
- [Commits](https://github.com/DeterminateSystems/update-flake-lock/compare/v14...v15)

---
updated-dependencies:
- dependency-name: DeterminateSystems/update-flake-lock
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-01 11:47:22 +01:00
har7an
11b0210de5
plugins: rework plugin loading (#1924)
* zellij: Move "populate_data_dir" to utils

and rewrite it to take a second, optional parameter. This allows
controlling whether only a specific asset should be installed. We do
this as preparation for being able to recover from a plugin version
mismatch error, where we will need to repopulate the data dir for
offending plugins.

* server/wasm_vm: Recover from PluginVersionMismatch

Adds a global plugin cache that stores, per plugin config, the wasmer
module associated with it. Make `start_plugin` take the pre-populated
module and create only the necessary modifications to the wasm env etc.

* utils: Fix formatting

* zellij: Delete non-existent module

* utils/shared: fix missing "set_permissions"

function when not on unix systems.

* server/wasm_vm: Don't populate cachedir

with serialized versions of the WASM plugins.

* utils/input/plugins: load wasm bytes from assets

for builtin plugin specifications. This foregoes any need to:

- Dump the plugin bytes to disk at all and
- subsequently read the plugin bytes from disk

* zellij: Disable default asset installation

which previously installed only the builtin plugins to disk. This is no
longer necessary because now we can load the builtin plugins directly
from the application binary.

* utils/input/plugins: Update docs

* utils/input/plugins: Add 'is_builtin' method

to `PluginConfig` that returns true if the plugin configuration refers
to a builtin plugin.

* wasm_vm: Remove plugin version mismatch handling

because a version mismatch in an internal plugin is now unfixable, with
the plugins being loaded from the running binary, and we have no control
over external plugins in the first place.

* cargo: Reintroduce feature flag

for `disable_automatic_asset_installation`

* utils/consts: Add `ASSET_MAP`

which currently contains the compiled WASM plugins.

* utils/shared: Fix clippy lint

* utils/errors: Add more `ZellijError` variants

* zellij: Make loading internal plugins optional

by reenabling the `disable_automatic_asset_installation` flag and
utilizing it for this purpose. Changes plugin search behavior to throw
better errors in case the builtin plugins cannot be found, depending on
the state of this feature.

* utils/errors: Apply rustfmt

* utils/setup: Allow dumping builtin plugins

to a specified folder on disk. This is meant to be an "escape hatch" for
users that have accidentally deleted the builtin plugins from disk (in
cases where the plugins aren't loaded from inside the zellij binary).

* utils/input/plugins: Update docs

* utils/setup: Add hint to `setup --check` output

when zellij was built without the `disable_automatic_asset_installation`
flag and will thus not read builtin plugins from the "PLUGIN DIR".

* utils/setup: Refine `setup --dump-plugins`

to dump to:

- The default "DATA DIR" when no option is provided with the argument,
  or
- The provided option, if existent

Also print a message to stdout with the destination folder that the
plugins are dumped to.

* server/wasm_vm: Ignore "NotFound" errors

when attempting to delete the non-existent plugin data directories. This
silences an error message that otherwise ends up in the logs when
quitting zellij.

* utils/errors: Extend "BuiltinPluginMissing" msg

to hint the user to the `zellij setup --dump-plugins` command to fix
their issues for them!

* utils/errors: Track caller in calls to `non_fatal`

which will hopefully, once closures can be annotated, allow us to
display the location of the call to `non_fatal` in log messages.

* utils/input/plugins: Fix plugin lookup

to prefer internal assets if available. It was previously broken because
sorting the paths vector before deduping it would bring the paths into a
wrong order, looking up in the plugin folder first.

Also print a log message when a plugin is being loaded from the internal
assets but exists on disk, too.

* Apply rustfmt

* make: build-e2e depends on wasm-opt-plugins

so it updates the assets when building the binary

* server/qwasm_vm: Remove var

* utils/consts: Add plugins from target folder

and include them in the asset map from there, too. Include plugins from
debug or release builds, depending on the build type.

* utils/consts: Take release plugins from assets

instead of the target/release folder. The latter will break
installations from crates.io, because we currently rely on including the
plugins we pre-compiled and distribute along with the binary.

* server/wasm_vm: Reintroduce .cache folder

to speedup subsequent application launches.

* cargo: Reorder workspace members

to improve behavior with `cargo make` with respect to compilation order.

* Makefile: restructure plugin tasks

* Makefile: Fix CI errors

* Makefile: More CI diagnosis

* github: Install wasm-opt in e2e test workflow

* Makefile: Build plugins for e2e-test target

* server/Wasm_vm: Reorder plugin folder creation

so no folders are created in the plugin cache when loading a plugin
fails due to not being present or similar.

* update plugins testcommit

* makefile: Change job order

* changelog: Add PR #1924
2022-11-22 20:06:02 +00:00
Aram Drevekenin
d68db715d1
chore(ci): remove msrv check (#1923) 2022-11-09 23:03:11 +01:00
dependabot[bot]
373351a265
build(deps): bump cachix/install-nix-action from 17 to 18 (#1890)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-01 09:55:51 +01:00
dependabot[bot]
3b05f12d2e
build(deps): bump cachix/cachix-action from 10 to 12 (#1891)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-01 09:34:20 +01:00
Aram Drevekenin
f23ea515d4
chore(ci): do not strip binary 2022-10-25 11:02:18 +02:00
Aram Drevekenin
5cc5995912
chore(ci): do not strip for aarch64 2022-10-25 10:45:59 +02:00
Aram Drevekenin
339eacce99
chore(release): temporarily disable aarch64 2022-10-25 10:15:32 +02:00
Aram Drevekenin
59d9cb53b6
chore(ci): fix binaryen install for ubuntu (I hope) 2022-10-25 09:56:21 +02:00
Aram Drevekenin
6550c8dc3a
chore(release): remove extraneous ci step 2022-10-25 09:44:16 +02:00
Aram Drevekenin
c50103ffb9
chore(ci): brew work now plox 2022-10-25 09:42:39 +02:00
Aram Drevekenin
df77577274
chore(ci): install brew in ubuntu 2022-10-25 09:28:49 +02:00
a-kenji
716f606b44 update: update-rust-toolchain v1 -> v1.1 2022-10-01 13:50:35 +02:00
dependabot[bot]
f5efb0d731
build(deps): bump DeterminateSystems/update-flake-lock from 13 to 14 (#1762)
Bumps [DeterminateSystems/update-flake-lock](https://github.com/DeterminateSystems/update-flake-lock) from 13 to 14.
- [Release notes](https://github.com/DeterminateSystems/update-flake-lock/releases)
- [Commits](https://github.com/DeterminateSystems/update-flake-lock/compare/v13...v14)

---
updated-dependencies:
- dependency-name: DeterminateSystems/update-flake-lock
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-01 10:05:25 +02:00
dependabot[bot]
c71e16916f
build(deps): bump DeterminateSystems/update-flake-lock from 12 to 13 (#1683)
Bumps [DeterminateSystems/update-flake-lock](https://github.com/DeterminateSystems/update-flake-lock) from 12 to 13.
- [Release notes](https://github.com/DeterminateSystems/update-flake-lock/releases)
- [Commits](https://github.com/DeterminateSystems/update-flake-lock/compare/v12...v13)

---
updated-dependencies:
- dependency-name: DeterminateSystems/update-flake-lock
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-23 08:26:31 +02:00
Aram Drevekenin
d9d7ef3aef
chore(workflows): change rust-toolchain update to once per month 2022-08-14 10:12:59 +02:00
Aram Drevekenin
018d32e997
style(comment): update flake-lock frequency comment 2022-08-11 16:02:31 +02:00
Aram Drevekenin
be2ab63106
chore(ci): change frequency of flake lock updates to once per month 2022-08-11 16:01:55 +02:00
dependabot[bot]
3bfc8e5421
build(deps): bump DeterminateSystems/update-flake-lock from 10 to 12 (#1624)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-01 10:16:22 +02:00
a-kenji
371d105a78
fix(ci): remove cachix environment (#1617) 2022-07-29 21:58:41 +02:00
Jae-Heon Ji
cbb698fb62
fix(ci): change checksum tool in macos (#1613) 2022-07-29 20:25:14 +09:00
Aram Drevekenin
660ac41b7a
chore(ci): do not upload checksum for macos 2022-07-28 17:43:52 +02:00
a-kenji
d1fa067713
fix(ci): quoting issues (#1589) 2022-07-15 12:35:36 +02:00
a-kenji
ea1e36637d
fix(ci): add new rust toolchain location to action (#1576) 2022-07-10 12:29:21 +02:00
a-kenji
6689f67436
fix(ci): clippy (#1559)
Install `cargo-make` explicitly in the workflow,
even tough it should be cached from the previous steps.

There are some corner cases in which gh messes the caching up
and can't access it.
2022-07-04 20:56:47 +02:00
dependabot[bot]
ccbcc5ca83
build(deps): bump DeterminateSystems/update-flake-lock from 9 to 10 (#1543)
Bumps [DeterminateSystems/update-flake-lock](https://github.com/DeterminateSystems/update-flake-lock) from 9 to 10.
- [Release notes](https://github.com/DeterminateSystems/update-flake-lock/releases)
- [Commits](https://github.com/DeterminateSystems/update-flake-lock/compare/v9...v10)

---
updated-dependencies:
- dependency-name: DeterminateSystems/update-flake-lock
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-27 09:35:23 +02:00
a-kenji
641c5a34d4
add(ci): check for msrv (#1522) 2022-06-17 12:16:33 +02:00
a-kenji
3ccc1f3946
Add/ci enable clippy (#1509)
* fix(clippy): clippy fixes

* add(ci): enable clippy warnings

* chore(fmt): cargo fmt

* disable: failing clippy action

Add `cargo make clippy` in ci
2022-06-15 15:26:52 +02:00
Jae-Heon Ji
53da135c3f
ci: add checksum for release binary (#1482) 2022-06-11 11:18:29 +09:00
a-kenji
edac2eb5a9
add(ci/makefile): run clippy on all features (#1479)
Run clippy on all exposed features, to minimize the possiblility
of breakage.
2022-06-10 12:21:01 +02:00
a-kenji
a614d11737
ci(nix): retry nix build on spurious failure (#1472) 2022-06-09 19:58:16 +02:00
dependabot[bot]
52123c5c04
build(deps): bump DeterminateSystems/update-flake-lock from 8 to 9 (#1365)
Bumps [DeterminateSystems/update-flake-lock](https://github.com/DeterminateSystems/update-flake-lock) from 8 to 9.
- [Release notes](https://github.com/DeterminateSystems/update-flake-lock/releases)
- [Commits](https://github.com/DeterminateSystems/update-flake-lock/compare/v8...v9)

---
updated-dependencies:
- dependency-name: DeterminateSystems/update-flake-lock
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-02 12:44:01 +02:00
dependabot[bot]
0531a13fc5
build(deps): bump cachix/install-nix-action from 16 to 17 (#1310)
Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 16 to 17.
- [Release notes](https://github.com/cachix/install-nix-action/releases)
- [Commits](https://github.com/cachix/install-nix-action/compare/v16...v17)

---
updated-dependencies:
- dependency-name: cachix/install-nix-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-11 19:19:10 +02:00
dependabot[bot]
618aea12b6
build(deps): bump actions/cache from 2 to 3 (#1277)
Bumps [actions/cache](https://github.com/actions/cache) from 2 to 3.
- [Release notes](https://github.com/actions/cache/releases)
- [Commits](https://github.com/actions/cache/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-28 15:05:33 +02:00
a-kenji
4ba3a70f9a fix(ci): disable enabling of flakes in action's 2022-03-25 00:08:20 +01:00
a-kenji
d072e045f3 fix(ci): scope for triggering the workflow 2022-03-25 00:06:28 +01:00
a-kenji
73740a4b3f add(ci): token to update-rust-toolchain
In order to trigger ci from the pr.
2022-03-21 12:14:21 +01:00
a-kenji
5bf8c133d5 add(ci): update token 2022-03-21 11:35:58 +01:00
a-kenji
301c546041
fix(ci): scope nix workflows (#1248) 2022-03-20 22:13:24 +01:00
a-kenji
78eeac7d80 fix(ci): use release version instead of main 2022-03-20 21:07:41 +01:00
a-kenji
f838feed85 fix(ci): semantic error 2022-03-20 15:04:36 +01:00
a-kenji
612746898a
fix: remove obsolete script (#1247) 2022-03-20 15:01:47 +01:00
a-kenji
36471830df fix(ci): add ref 2022-03-20 14:52:37 +01:00
a-kenji
d01df9cb25
add(ci): toolchain (#1245) 2022-03-20 14:50:20 +01:00
a-kenji
8bb46715a9 fix(ci): update-rust-toolchain 2022-03-17 17:24:39 +01:00
a-kenji
3907e2b9f1 fix(ci) update-rust-toolchain 2022-03-17 17:21:50 +01:00
a-kenji
5db634ad51 fix(ci): update-rust-toolchain
Fix a typo
2022-03-17 17:11:32 +01:00
a-kenji
91f24114ee fix(ci) update-rust-toolchain 2022-03-17 17:08:46 +01:00
a-kenji
1612bec8ba fix(ci): update-toolchain 2022-03-17 16:56:15 +01:00