ngless-toolkit / ngless-toolkit/ngless

Inconsistent use of `local import`

Open
#117 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Rust
Stars
152
Forks
23
PR merge metrics
No merged PRs in 30d

Description

This was noticed when setting up the motus ngless-contrib module.

The following ngless script runs fine, but I'm not sure it should:

ngless "1.0"
import "motus" version "2.1"

In particular because version 2.1 is not an internal module meaning it should require the local keyword.

Trying to use any of the other modules in ngless-contrib without the local keyword triggers the To import local modules, use "local import" error.

My understanding is that since motus also exists as an internal module (version 1.0) the local keyword check is bypassed.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the import parsing and module-resolution logic for the two scripts in the issue, comparing the internal motus module with modules from ngless-contrib. Add a regression test covering both imports and confirm that local modules consistently require the local keyword without changing valid internal-module imports.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.