RFC: Interfaces between nix <-> python <-> javascript #1832
Labels
No Label
backups
blog
bootstrapping
bug
changes-requested
cli
documentation
duplicate
enhancement
facts
help wanted
invalid
Inventory
low_prio
manager
modules
needs-review
networking
packaging
question
secrets
template
test
tooling
user-testing
vm
wontfix
No Milestone
No project
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: clan/clan-core#1832
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem: dataclass generation makes it such that nix code and clan-app (python code) has to have the same git revision. However a user can have an old clan-app installed and create a new clan that uses different nix code modules with a slightly differing interface. Before we could check if a field exists and "ignore" it or set default values due to the nature of dynamic typing.
Two solutions.
clan-app can only be started from a clan devshell (and not globally)
--> Problem: Can't use clan uri invocations through desktop files if not globally installed
Don't generate Dataclasses and instead make everything only runtime checked.
--> How do we fix incompatible frontend code that expects different values for a nix module
--> How do we fix the inventory which may have an incompatible or old schema
SOLUTION:
--> Every clan module needs to ship with the frontend code
--> Every clan module needs to ship with a inventory migration script
--> Every clan module should ship with a test
clan-appto RFC: Interfaces between nix and python and javascript3. Solution
clan-app becomes a thin wrapper that runs
nix run --inputs-from <local-flake> .#clan-web
, that actually contains all the code that the currently inclan-app
. This allows to freely generate all python/ts code as part of the build and make sure everything is always in sync. We also no longer need to check in python code because we can just add a library package to propagatedBuildInputs ofclan-web
Problem: Can't have UI for external clan modules
RFC: Interfaces between nix and python and javascriptto RFC: Interfaces between nix <-> python <-> javascriptI like the idea of @mic92. The problem that we "cant" have a ui for external modules, can be solved. If the external clan modules are rendered completely dynamically. But apart from the UI, they also need to be compatible to the "core" modules.
So it'd be best if everything is in sync with each other, everything else can lead to undefined behavior, but might be fine?
For UI, i'd like to allow modules, some form of templating language, that allows them to ship a config mask that is dynamically loaded. But that needs a while...