Skip to content

Use relative path imports#705

Merged
ppenna merged 2 commits into
nanvix/v3.12.3from
fix/imports
Jun 9, 2026
Merged

Use relative path imports#705
ppenna merged 2 commits into
nanvix/v3.12.3from
fix/imports

Conversation

@ada-x64

@ada-x64 ada-x64 commented Jun 9, 2026

Copy link
Copy Markdown

This PR utilizes zutils v0.11.1's relative path import feature to simplify the boilerplate in the build scripts. This enables proper LSP support and better linting.

test.py and docker.py were moved to _test.py and _docker.py in order to avoid clashing with the existing docker directory and stdlib-reserved test module.

Note: Some pyright ignores were added in order to keep this PR minimal.

Copilot AI review requested due to automatic review settings June 9, 2026 16:28

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Nanvix CPython build scripts under .nanvix/ to rely on nanvix-zutil v0.11.1’s relative path import support, removing the previous sys.path + _loader.load_sibling() boilerplate to improve editor/LSP behavior and linting.

Changes:

  • Replaced load_sibling(...)-based module loading with direct sibling imports across .nanvix/*.py.
  • Simplified a couple of long string constructions in .nanvix/_docker.py.
  • Added targeted pyright ignores where kwarg-dict typing is currently too broad.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
.nanvix/z.py Switches to direct sibling imports; adds pyright ignores on kwarg expansions.
.nanvix/ramfs.py Removes _loader bootstrapping and imports config directly.
.nanvix/package.py Removes _loader bootstrapping and imports sibling modules directly.
.nanvix/lxml.py Removes _loader bootstrapping and imports config directly.
.nanvix/build.py Removes _loader bootstrapping; imports _docker/lxml/config directly.
.nanvix/_test.py Removes _loader bootstrapping and imports sibling modules directly.
.nanvix/_docker.py Removes _loader bootstrapping; minor string formatting simplification.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .nanvix/z.py Outdated
Copilot AI review requested due to automatic review settings June 9, 2026 16:36

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Comment thread .nanvix/z.py
@ada-x64 ada-x64 marked this pull request as ready for review June 9, 2026 16:44
Copilot AI review requested due to automatic review settings June 9, 2026 16:44

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.

@ada-x64 ada-x64 mentioned this pull request Jun 9, 2026
@ppenna ppenna self-assigned this Jun 9, 2026
@ppenna ppenna merged commit 1ddfa07 into nanvix/v3.12.3 Jun 9, 2026
15 checks passed
@ppenna ppenna deleted the fix/imports branch June 9, 2026 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants