Skip to content

A program importing two modules with the last segment 'parser' (jq's and jsonpath's) fails: 'free_query' is not exported from module 'parser' #3103

Closed

Description

@nicolas-maman

contrib/jq's test_after_jsonpath.ae (and test_with_jsonpath.ae) do not compile:

cd contrib/jq && aetherc --check test_after_jsonpath.ae
error[E0303]: 'free_query' is not exported from module 'parser'

ae build fails the same way (main at v0.839.0, and 639d264). The program imports two modules whose last path segment is parser (jq's own parser and jsonpath's), and a qualified parser.free_query resolves against the wrong one. #2255 made two shipped modules sharing a last segment a checked case, but a program that imports both still collides here.

Expected: each parser. call resolves to the module that import bound (its full path, or the alias the program gave), so both programs build and run; if two imports genuinely cannot be told apart, the error names both modules and how to alias one.

Also in contrib/jq, two W1002 unreachable-code warnings (eval.ae:3650, lexer.ae:144) to remove. Found on #3101.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcompiler

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions