Skip to content

feat: improve scopedImport with _file attribute and scoped in builtins - #39

Merged
vic merged 2 commits into
denful:mainfrom
jbgi:scopedImport-improvements
Sep 1, 2026
Merged

feat: improve scopedImport with _file attribute and scoped in builtins#39
vic merged 2 commits into
denful:mainfrom
jbgi:scopedImport-improvements

Conversation

@jbgi

@jbgi jbgi commented Aug 26, 2026

Copy link
Copy Markdown
Contributor
  • add _file for proper error reporting
  • add builtins.scoped for potential reuse of scoped variable in nested invocations (see example in doc).
  • __nixPath was overriden but not builtins.nixPath: fixed that.

@jbgi
jbgi force-pushed the scopedImport-improvements branch from 4eb89bd to c75b714 Compare August 26, 2026 15:49
@sini
sini self-requested a review August 26, 2026 16:05

@vic vic left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We have a few tests for scoped.* can you please add some tests exercising the changes here ? builtins.scoped being correctly set and builtins.nixPath ?

Code looks good.

jbgi added 2 commits September 1, 2026 13:01
also properly override builtins.nixPath in addition to __nixPath.
 even if scope include a builtins attribute set.
 Also allows to explicitly set nixPath via scope.
@jbgi
jbgi force-pushed the scopedImport-improvements branch from c75b714 to ef94a80 Compare September 1, 2026 11:10
@jbgi

jbgi commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

@vic tests added. Also added a last commit to improve consitancy when provided scope include a builtins attribute set. I can remove it if you prefer.

@jbgi
jbgi requested a review from vic September 1, 2026 11:16
@vic
vic merged commit f33aad5 into denful:main Sep 1, 2026
3 checks passed
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.

2 participants