Skip to content

kicad: 7.0.10 -> 8.0.1#291134

Merged
kirillrdy merged 5 commits into
NixOS:masterfrom
evils:kicad-8
Mar 22, 2024
Merged

kicad: 7.0.10 -> 8.0.1#291134
kirillrdy merged 5 commits into
NixOS:masterfrom
evils:kicad-8

Conversation

@evils

@evils evils commented Feb 24, 2024

Copy link
Copy Markdown
Member

Description of changes

7.0.11 release blog post
8.0.0 release blog post
8.0.1 release blog post

Things done

bump 7.0.10 to 7.0.11 (included separately to stay reachable and be backported to 23.11)
bump kicad-unstable to 2024-02-07 (fixes its build, adds dependencies that are now part of 8.0.0, update wrapper env vars)
bump 7.0.11 to 8.0.0 (uses the kicad-unstable new dependencies and env var wrappers)
(also bumps kicad-unstable and kicad-testing, should be almost exactly the same at the moment)

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
    • 4 packages failed to build: kicadAddons.kikit kicadAddons.kikit-library kikit kikit.dist
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@evils evils mentioned this pull request Feb 24, 2024
13 tasks
@evils

evils commented Feb 24, 2024

Copy link
Copy Markdown
Member Author

ping KiKit maintainers @jfly @matusf
it appears this breaks kikit etc.
(kicadAddons.kikit kicadAddons.kikit-library kikit kikit.dist)

Comment thread pkgs/applications/science/electronics/kicad/base.nix
@bgamari

bgamari commented Feb 24, 2024

Copy link
Copy Markdown
Contributor

Thanks for handling this, @evils!

@ofborg ofborg Bot added 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. labels Feb 24, 2024
@evils

evils commented Feb 24, 2024

Copy link
Copy Markdown
Member Author

i suggest this approach for KiKit:
keep 23.11 on 7.x where stable KiKit will keep working
update KiKit on nixos-unstable to master, where it seems the compatibility is already fixed

@evils

evils commented Feb 24, 2024

Copy link
Copy Markdown
Member Author

also @jfly i've edited your runtime data path patch's env var to use KICAD8 to match up with the other env vars, i hope that's ok

@evils

evils commented Feb 24, 2024

Copy link
Copy Markdown
Member Author

oh and on sway (wayland) with mixed DPI monitors this may have trouble getting an appropriate area
this may be a wxwidgets issue and may be resolved on their master branch, i haven't looked into it for a while...

@jfly jfly left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @evils! For the record, kikit does not seem to be buildable on this branch. How I tested:

$ nix-build -E 'let pkgs = import (builtins.fetchTarball { url = "https://github.com/NixOS/nixpkgs/archive/e70e1370a88f86ea989902e140172e9cff0d379a.tar.gz"; }) {}; in pkgs.kicad.override {addons=[pkgs.kicadAddons.kikit pkgs.kicadAddons.kikit-library];}'
...
not ok 38 Dumping preset with plugin
# (in test file /build/source/test/system/panelize.bats, line 301)
#   `kikit panelize --dump preset-plugin.json \' failed
# 01:58:47: Error: Directory '/homeless-shelter' couldn't be created (error 13: Permission denied)
# 01:58:47: Error: Directory '/homeless-shelter/.config/kicad/8.0' couldn't be created (error 2: No such file or directory)
# An error occurred: module 'pcbnewTransition.pcbnew' has no attribute 'EDA_RECT'
# No output files produced
# Traceback (most recent call last):
#   File "/nix/store/79gz22x7k5q7755hzcnz501g0is7fsd3-kikit-1.4.0/lib/python3.11/site-packages/kikit/panelize_ui.py", line 217, in panelize
#     doPanelization(input, output, preset, plugin)
#   File "/nix/store/79gz22x7k5q7755hzcnz501g0is7fsd3-kikit-1.4.0/lib/python3.11/site-packages/kikit/panelize_ui.py", line 266, in doPanelization
#     ki.buildLayout(preset, panel, input, sourceArea)
#   File "/nix/store/79gz22x7k5q7755hzcnz501g0is7fsd3-kikit-1.4.0/lib/python3.11/site-packages/kikit/panelize_ui_impl.py", line 268, in buildLayout
#     substrates = lPlugin.buildLayout(panel, sourceBoard, sourceArea)
#                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#   File "/build/source/test/resources/testplugin.py", line 33, in buildLayout
#     panel.appendBoard(inputFile, pcbnew.wxPointMM(0, 0), sourceArea)
#   File "/nix/store/79gz22x7k5q7755hzcnz501g0is7fsd3-kikit-1.4.0/lib/python3.11/site-packages/kikit/panelize.py", line 991, in appendBoard
#     drawings = collectItems(board.GetDrawings(), enlargedSourceArea)
#                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#   File "/nix/store/79gz22x7k5q7755hzcnz501g0is7fsd3-kikit-1.4.0/lib/python3.11/site-packages/kikit/common.py", line 83, in collectItems
#     return list([x for x in boardCollection if fitsIn(x.GetBoundingBox(), sourceArea)])
#                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#   File "/nix/store/79gz22x7k5q7755hzcnz501g0is7fsd3-kikit-1.4.0/lib/python3.11/site-packages/kikit/common.py", line 83, in <listcomp>
#     return list([x for x in boardCollection if fitsIn(x.GetBoundingBox(), sourceArea)])
#                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#   File "/nix/store/79gz22x7k5q7755hzcnz501g0is7fsd3-kikit-1.4.0/lib/python3.11/site-packages/kikit/common.py", line 49, in fitsIn
#     assert isinstance(what, (BOX2I, VECTOR2I, pcbnew.wxPoint, pcbnew.EDA_RECT))
#                                                               ^^^^^^^^^^^^^^^
# AttributeError: module 'pcbnewTransition.pcbnew' has no attribute 'EDA_RECT'
ok 39 Present a single board # skip PcbDraw is not available, skipping
ok 40 Steel stencils
ok 41 Steel stencils with cutout
ok 42 Printed stencils
make: *** [Makefile:40: test-system] Error 1

I see this is fixed upstream in yaqwsx/KiKit@c920ba3, which was released just 16 hours ago in kikit 1.5.0. Looking at the ryantm update logs, I think it just hasn't realized there's a new version of kikit yet: https://r.ryantm.com/log/kikit/ (the last run was 3 days ago on 2024-02-23). I did try upgrading locally, and I see a new test failure, though. If it's ok, I'd like to wait a day to see if the update bot sends in an update PR (I'm a quite new maintainer of nixpkgs and would like to learn how to fix a broken auto-update PR).

@evils

evils commented Feb 27, 2024

Copy link
Copy Markdown
Member Author

i don't believe the bot submits PRs if the package fails to build :)

@jfly

jfly commented Feb 27, 2024

Copy link
Copy Markdown
Contributor

Ah, OK. How am I as a maintainer supposed to know that happened so I can intervene?

@evils

evils commented Feb 27, 2024

Copy link
Copy Markdown
Member Author

good question, i don't believe it emits such indications
i suppose that's in part to avoid spamming people

one thing you can do is run this script once in a while
nix-shell maintainers/scripts/update.nix --argstr maintainer jfly
i don't think that's nearly as extensive as what the bot does
it does seem to get everything you maintain minus kikit/solidpython

@jfly jfly mentioned this pull request Feb 27, 2024
13 tasks
@jfly

jfly commented Feb 27, 2024

Copy link
Copy Markdown
Contributor

Gotcha. That's a bummer, I thought I just had to look at my email to keep things up to date.

For the record, I've created #291734 to get kikit upgraded. If we can get that merged first, then there shouldn't be a window of time in master where kikit is broken.

jfly added a commit to jfly/nixpkgs that referenced this pull request Mar 10, 2024
This includes support for KiCad 8 (see complete changelog
[here](https://github.com/yaqwsx/KiKit/releases/tag/v1.5.0)), which should unblock
NixOS#291134.

With this upgrade, a test started failing:

    $ nix build .#kikit
    ...
    kikit> not ok 40 Steel stencils
    kikit> # (in test file /build/source/test/system/stencil.bats, line 6)
    kikit> #   `kikit stencil create  --jigsize 60 60 $RES/conn.kicad_pcb steelStencil' failed
    kikit> # 04:32:16: Error: Directory '/homeless-shelter' couldn't be created (error 13: Permission denied)
    kikit> # An error occurred: OpenSCAD is not available.
    kikit> # Did you install it? Program `openscad` has to be in PATH
    kikit> # No output files produced
    kikit> not ok 41 Steel stencils with cutout
    kikit> # (in test file /build/source/test/system/stencil.bats, line 10)
    kikit> #   `kikit stencil create  --jigsize 60 60 --cutout J4 $RES/conn.kicad_pcb steelStencil' failed
    kikit> # 04:32:17: Error: Directory '/homeless-shelter' couldn't be created (error 13: Permission denied)
    kikit> # An error occurred: OpenSCAD is not available.
    kikit> # Did you install it? Program `openscad` has to be in PATH
    kikit> # No output files produced
    kikit> not ok 42 Printed stencils
    kikit> # (in test file /build/source/test/system/stencil.bats, line 14)
    kikit> #   `kikit stencil createprinted \' failed
    kikit> # 04:32:17: Error: Directory '/homeless-shelter' couldn't be created (error 13: Permission denied)
    kikit> # An error occurred: OpenSCAD is not available.
    kikit> # Did you install it? Program `openscad` has to be in PATH
    kikit> # No output files produced
    kikit> make: *** [Makefile:40: test-system] Error 1
    kikit> /nix/store/3qnm3nwjajgqa771dmi2dnwxrw0kzq5m-stdenv-linux/setup: line 131: pop_var_context: head of shell_variables not a function context
    error: builder for '/nix/store/f3klmz0qvi6yr3qfy7cww434f2z4kjx5-kikit-1.5.0.drv' failed with exit code 2;

This is failing in some pretty old kikit code, so I think this is just
failing due to kikit now having more complete code coverage. While
researching this, I discovered kikit's documentation about [optional
dependencies], which I suppose we don't have good support for right now.
Rather than invent a new option for that, I've opted to preserve the
existing behavior and just do the bare minimum to keep the build
passing.

[optional dependencies]: https://github.com/yaqwsx/KiKit/blob/v1.5.0/docs/installation/intro.md#optional-dependencies
@evils

evils commented Mar 13, 2024

Copy link
Copy Markdown
Member Author

just a note in case anyone was holding off on reviewing or merging this
the kikit PR was merged, so it's no longer blocking this one

@jfly jfly left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM, but I still can't successfully test out kikit on this branch because it doesn't have the latest changes from master.

I tried checking out this PR locally and rebasing on top of the latest in master and got a conflict in pkgs/development/libraries/log4cplus/default.nix that I'm stumped by.

@kirillrdy

Copy link
Copy Markdown
Member

@jfly if you run nixpkgs-review pr 291134

it will build you a merge of master and this PR

@jfly

jfly commented Mar 14, 2024

Copy link
Copy Markdown
Contributor

Thanks, @kirillrdy. I just manually tested out kikit with this PR, and things seem to work!

@kirillrdy

Copy link
Copy Markdown
Member

Result of nixpkgs-review pr 291134 run on x86_64-linux 1

3 packages failed to build:
  • python312Packages.kicad
  • python312Packages.pcbnew-transition
  • python312Packages.pcbnew-transition.dist
13 packages built:
  • kicad
  • kicad-small
  • kicad-testing
  • kicad-testing-small
  • kicad-unstable
  • kicad-unstable-small
  • kicadAddons.kikit
  • kicadAddons.kikit-library
  • kikit
  • kikit.dist
  • python311Packages.kicad
  • python311Packages.pcbnew-transition
  • python311Packages.pcbnew-transition.dist

3.12 build fails because of diffimg which also fails on master

@evils

evils commented Mar 16, 2024

Copy link
Copy Markdown
Member Author

oh, i maintain diffimg -_-

@evils evils mentioned this pull request Mar 16, 2024
13 tasks
@kiranshila

Copy link
Copy Markdown
Contributor

Perhaps this PR can also cover the recent bugfix release as well? https://www.kicad.org/blog/2024/03/KiCad-8.0.1-Release/

@evils

evils commented Mar 17, 2024

Copy link
Copy Markdown
Member Author

pushed 8.0.1

@evils evils changed the title kicad: 7.0.10 -> 8.0.0 kicad: 7.0.10 -> 8.0.1 Mar 17, 2024
@kirillrdy

Copy link
Copy Markdown
Member

Result of nixpkgs-review pr 291134 run on aarch64-linux 1

16 packages failed to build:
  • kicad
  • kicad-small
  • kicad-testing
  • kicad-testing-small
  • kicad-unstable
  • kicad-unstable-small
  • kicadAddons.kikit
  • kicadAddons.kikit-library
  • kikit
  • kikit.dist
  • python311Packages.kicad
  • python311Packages.pcbnew-transition
  • python311Packages.pcbnew-transition.dist
  • python312Packages.kicad
  • python312Packages.pcbnew-transition
  • python312Packages.pcbnew-transition.dist

@evils

evils commented Mar 19, 2024

Copy link
Copy Markdown
Member Author

8.0.0 also fails on aarch64
7.0.10 doesn't have the qa_cli test that's failing
checking the -unstable package now

@evils

evils commented Mar 19, 2024

Copy link
Copy Markdown
Member Author

it doesn't appear as if aarch64-linux is supported by upstream
not sure how best to reflect this in the package here
i'm inclined to skip the qa_cli test for aarch64-linux and hope that if there is an issue with the actual app a Nix user reports the issue to nixpkgs
(i have an aarch64 VPS available, but nothing i can practically check the GUI on)

@lukaslihotzki

Copy link
Copy Markdown
Contributor

I can confirm that the Kicad (both 8.0.1 and testing 2024-03-16) GUI works fine on aarch64 NixOS. I disabled the tests completely (doInstallCheck = false;). Although this should be independent of qa_cli which checks the kicad-cli CLI tool.

Additionally, I get this build error when doing nixpkgs-review pr 291134: ModuleNotFoundError: No module named 'distutils' when building python3.12-wxpython-4.2.1.

@lukaslihotzki

Copy link
Copy Markdown
Contributor

The qa_cli test fails because of some image differences and because the items in the orcadpcb2 output are unexpectedly reordered. So, the item ordering of orcadpcb2 (which is determined by an rtree) seems to be architecture-specific. I don't know if this is a bug in rtree or if the test is too strict, but this test fail should be harmless otherwise. I haven't looked at the image differences yet.

evils added 5 commits March 20, 2024 21:09
disables failing qa_spice test suite for unstable
  upstream seems aware, have not reported it though
switch to KICAD8 env vars

make the previously unstable dependencies stable
reenable the qa_eeschema test
and disable qa_spice

also bump testing and unstable
@evils

evils commented Mar 20, 2024

Copy link
Copy Markdown
Member Author

i've added disabling the qa_cli test on aarch64-linux

@kirillrdy kirillrdy merged commit 97c86a7 into NixOS:master Mar 22, 2024
@kirillrdy

Copy link
Copy Markdown
Member

@evils thank you for PR
feel free to tag me for any fallout

@evils

evils commented Mar 24, 2024

Copy link
Copy Markdown
Member Author

note for completeness: someone from upstream successfully ran the qa_cli test on ubuntu on aarch64
but confirmed it's not an officially supported platform

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants