DAX: re-enable testing and build only on artiq-full #58
Loading…
Reference in New Issue
No description provided.
Delete Branch ":feature/dax"
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?
@sb10q, DAX should preferably only test and build for artiq-full. Let me know if you find this an acceptable solution. If not, let me know what alternative approach you prefer.
I tried to test as much as possible of the changes, but I was not able to test all of them.
@ -49,6 +49,7 @@
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs nixos-21.05", "emailresponsible": false },
"nixScripts": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/nix-scripts.git", "emailresponsible": false },
"a6p": { "type": "boolean", "value": "true" },
"beta": { "type": "boolean", "value": "true" },
Don't use
beta
. It will not be in beta forever. Instead create a new variablea7p
. But why not have DAX available for ARTIQ-6?DAX integrates very tightly with ARTIQ, and we only ensure compatibility with the current stable ARTIQ version, currently ARTIQ 6. Once ARTIQ 7 becomes the new stable version, we will make the jump to ARTIQ 7. So this moving
beta
flag should always signal the current ARTIQ beta version.Currently I use the
a6p
andbeta
flags to make sure DAX only builds for the stable ARTIQ version, but instead we can also drop thebeta
flag in favor of a similarstable
flag which is onlytrue
for the artiq-full channel. Then I do not rely on thea6p
flag.In this case it makes more sense to test for ARTIQ major version = 6. And you can change it to 7 when you want to support that version.
This way, when 7 becomes stable and 6 becomes legacy, your package will keep working.
Note that this version check can usually be done without an additional Hydra boolean flag, such a flag was introduced only because of some edge cases related to #1.
That's a better idea. The major version of DAX matches the major version of ARTIQ which it is designed to work with. I have updated this PR.
@ -265,4 +257,0 @@
''
pytest
mypy
flake8
Don't you still want mypy and flake8 to run?
Only Pytest is fine. We run all the extended tests + mypy + flake8 on our own CI infrastructure.
e236bdd629
to3954805eb4
@ -6,2 +6,2 @@
{ name, version, src, pythonOptions ? {}, condaOptions ? {}, withManual ? true}:
{
{ name, version, src, pythonOptions ? {}, condaOptions ? {}, enabled ? true, withManual ? true}:
pkgs.lib.optionalAttrs enabled ({
Why not simply use
pkgs.lib.optionalAttrs
ondualPackage
inextras.nix
?If I apply
pkgs.lib.optionalAttrs
ondualPackage
, then the DAX version (which I use in the boolean expression) is not defined yet. That could be solved with alet
statement, but I thought this might be a more attractive solution. If you still prefer applyingpkgs.lib.optionalAttrs
ondualPackage
, let me know.@ -249,2 +243,3 @@
name = "dax";
version = "6.3";
version = "6.4";
enabled = (builtins.substring 0 1 version) == (builtins.substring 0 1 artiqVersion);
This will break with version >=10. Use
builtins.splitVersion
.Still a lot of Nix to learn for me. Tnx for the tip!
3954805eb4
toee4014f008