<DigitalKiwi>
Also along the way I fixed at least three crashers which have been there since like 2015.
<DigitalKiwi>
lol
<DigitalKiwi>
but if you have runtime errors you get immediate feedback!
<aminechikhaoui>
gchristensen any idea how can I get mypy to see plugins ?
<aminechikhaoui>
btw maybe before merging py 2->3 we should create a branch pre-python3
<aminechikhaoui>
to make it easier to use plugins that are not yet migrated
<gchristensen>
aminechikhaoui: good idea
<aminechikhaoui>
gchristensen so what's your workflow with mypy/nixops ?
<gchristensen>
nix-shell in the nixops repo, then `mypy nixops` while I add types. if I'm looking for some new area to add types to, `mypy --html-report ./report nixops` and open ./report/index.html
<gchristensen>
but the report options make it much slower, so I don't use it each time
<aminechikhaoui>
./report/index.html doesn't seem to tell what's the problem just red or green :D
<gchristensen>
types for plugins: I was futzing with that ... but didn't manage to make it work.
<gchristensen>
try adding --pretty? it might help
<gchristensen>
oh I did get mypy to sort of work with plugins, but badly
<gchristensen>
in like 30min I can show you how
<aminechikhaoui>
no rush :-)
<aminechikhaoui>
you sure there is --pretty /
<aminechikhaoui>
? *
<gchristensen>
yeah, pretty sure
<gchristensen>
mypy's output is sometimes confusing / unclear, for sure
<gchristensen>
ify ou need help with one, glad to
<aminechikhaoui>
looks like I don't have --pretty for some reason
<gchristensen>
hm
<gchristensen>
try adding pretty = True to setup.cfg under [mypy] ?
<aminechikhaoui>
do you remember you mypy version
<aminechikhaoui>
ah seems to work with nixpkgs 20.03
<gchristensen>
aminechikhaoui: and I'm pushing my nixops-packet branch which works
<DigitalKiwi>
how make python language server work
<gchristensen>
aminechikhaoui: ehh I did break that
<gchristensen>
aminechikhaoui: the problem is we need to callPackage ourselves from inside nixops, to make sure both the plugin and nixops have a consistent env, and a consistent nixops
<gchristensen>
aminechikhaoui: overall the plugin model is a bit weird in the release.nix because of how it works ... but we can probably fix it
<gchristensen>
we need to be able to pass a nixops to the plugin's build so it can test, but that means a three-phase build: no-plugins, build the plugin, build nixops-with-plugins
<gchristensen>
so maybe ... hmm
<gchristensen>
aminechikhaoui: I feel using the release.nix makes this over-complicated
<aminechikhaoui>
yeah that's a bit complicated
<aminechikhaoui>
maybe we should make that logic in shell.nix
<gchristensen>
aminechikhaoui: maybe we should have a default.nix which does a simple, one-arch build
<gchristensen>
and then use release.nix to fan out
<aminechikhaoui>
+ some plugins.nix file which we don't check into the repo
<gchristensen>
yea
<aminechikhaoui>
dev-shell (list of plugins) is also a bit weird
<gchristensen>
very
<aminechikhaoui>
so using a file might be easier
<aminechikhaoui>
where we just point to local or remote git checkouts
<gchristensen>
maybe we should think about how we want it to work, then make it do that :P
<aminechikhaoui>
yeah :D
<DigitalKiwi>
make it run in lorri
<gchristensen>
yeah aminechikhaoui it'd be nice to not need to rebuild the plugin to build it again
<gchristensen>
to develop it*
<gchristensen>
aminechikhaoui: would you mind experimenting and thinking about this a bit? I need to get off the computer a while :)
<aminechikhaoui>
sure, which part not rebuilding the plugin or moving stuff out of release.nix or both :)
<gchristensen>
the whole "how do we develop on nixops + nixops plugins?" question :D
<aminechikhaoui>
yes, will have lunch and then look at that
<aminechikhaoui>
TypeError: '<' not supported between instances of 'method' and 'method'
<aminechikhaoui>
File "/home/amine/src/nixops/nixops/script_defs.py", line 233, in print_deployment
<aminechikhaoui>
something wrong during the sorting of the resource names or something
<gchristensen>
nice.
<gchristensen>
:|
<gchristensen>
aminechikhaoui: try changing:
<gchristensen>
...
<gchristensen>
aminechikhaoui: key = machine_to_key(depl.uuid, name, d.get_type) to key = machine_to_key(depl.uuid, name, d.get_type()) in script_defs.py around line 226