Skip to content

Conversation

@CryingN
Copy link
Contributor

@CryingN CryingN commented Apr 27, 2025

In the V language's REPL, there exists:

>>> import term { red }
>>> red('test')
error: unknown function: red
    7 | import term
    8 |
    9 | red('test')
      | ~~~~~~~~~~~
>>> import term {
... red
... }
>>> red('test')
test

For the error case, I rewrote the library import logic, adding a list for each library to represent what it imports (or importing everything). The modified code resolves these issues. Due to my current limited abilities, I've also discovered some unstable hidden problems during testing. If not merged, I've also created a more aggressive fork repository vrepl for testing by replacing the vrepl program.

@huly-for-github
Copy link

Connected to Huly®: V_0.6-22716

@spytheman
Copy link
Member

Please add a .repl test in vlib/v/slow_tests/repl/ .
You can run them with ./v vlib/v/slow_tests/repl/repl_test.v .

Copy link
Member

@spytheman spytheman left a comment

Choose a reason for hiding this comment

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

Excellent work.

@spytheman spytheman merged commit 146c766 into vlang:master Apr 28, 2025
63 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.

3 participants