You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The suggestion is to remove import declarations from .v files. and handle importing in another way
Instead of adding imports in every file and parse every time on compilation step, I suggest the compiler creates
a file in each project directory like .tmp/imports.bin
when user types a module name in code, for ex: fmt. compiler add this data into imports.bin file in a binary format automatically.
so linter sees that and no error showing about module not found or not imported yet.
In case when I cloned source repository, or I use editor without VLS, that file creates on the first compiler run. Also containing each .v file modification date, so after some files changed only their modules tree will be updated in imports.bin
The same for any local project module which I use.
In case when I have two modules with the same name, let's call it same_mod, I see 3 ways of resolving naming conflicts:
Consider of merging the same modules in a single one
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
The suggestion is to remove import declarations from .v files. and handle importing in another way
Instead of adding imports in every file and parse every time on compilation step, I suggest the compiler creates
a file in each project directory like
.tmp/imports.binwhen user types a module name in code, for ex:
fmt.compiler add this data intoimports.binfile in a binary format automatically.so linter sees that and no error showing about module not found or not imported yet.
In case when I cloned source repository, or I use editor without VLS, that file creates on the first compiler run. Also containing each .v file modification date, so after some files changed only their modules tree will be updated in
imports.binThe same for any local project module which I use.
In case when I have two modules with the same name, let's call it same_mod, I see 3 ways of resolving naming conflicts:
Consider of merging the same modules in a single one
entering a full path to the module:
Moduletype to compiler to keep aliasing like a regular var declaration:What are the benefit this approach gives:
What do you think? Would this even work?
This is a second suggestion for simplifying the language, first is here #23646
All reactions