Nim/tests/modules
quantimnot d30c6419a0
Refactor and doc package handling, module name mangling (#19821)
* Refactor and doc package handling, module name mangling

* Consolidate, de-duplicate and extend package handling
* Alter how duplicate module names of a package are handled
* Alter how module names are mangled
* Fix crash when another package is named 'stdlib' (test case added)
* Doc what defines a package in the manual

Modules with duplicate names within a package used to be given 'fake'
packages to resolve conflicts. That prevented the ability to discern if
a module belonged to the current project package or a foreign package.
They now have the proper package owner and the names are mangled in a
consistent manner to prevent codegen clashes.

All module names are now mangled the same. Stdlib was treated special
before, but now it is same as any other package. This fixes a crash
when a foreign package is named 'stdlib'.

Module mangling is altered for both file paths and symbols used by the
backends.

Removed an unused module name to package mapping that may have been
intended for IC. The mapping was removed because it wasn't being used
and was complicating the issue of package modules with duplicate names
not having the proper package owner assigned.

* Fix some tests

* Refactor `packagehandling`

* Remove `packagehandling.withPackageName` and its uses
* Move module path mangling from `packagehandling` to `modulepaths`
* Move `options.toRodFile` to `ic` to break import cycle

* Changed import style to match preferred style

Co-authored-by: quantimnot <quantimnot@users.noreply.github.com>
2022-05-30 18:52:19 +02:00
..
a Refactor and doc package handling, module name mangling (#19821) 2022-05-30 18:52:19 +02:00
b Refactor and doc package handling, module name mangling (#19821) 2022-05-30 18:52:19 +02:00
m9627
tnotuniquename_dir
definitions.nim
mexport2a.nim
mexport2b.nim
mexporta.nim
mexportb.nim
mforwarded_pure_enum.nim
mforwarded_pure_enum2.nim
mimport_in_config.nim
mmodule_same_proc.nim
mmodule_same_proc_client.nim
mnamspc1.nim
mnamspc2.nim
mnotuniquename.nim
mopaque.nim
morder_depa.nim
morder_depb.nim
mrange.nim
mrecmod.nim
mrecmod2.nim
proxy_module.nim
seq.nim
t8665.nim
t9627.nim
tambig_range.nim
tcanimport.nim
texplicit_system_import.nim
texport.nim
texport2.nim
tfowarded_pure_enum.nim
timport_in_config.nim
timport_in_config.nim.cfg
timportas.nim
timportexcept.nim
tincludeas.nim
tmismatchedvisibility.nim
tmodule_name_clashes.nim Refactor and doc package handling, module name mangling (#19821) 2022-05-30 18:52:19 +02:00
tmodule_same_proc.nim
tnamspc.nim
tnotuniquename.nim
tnotuniquename2.nim
topaque.nim
torder_dep.nim
trecinca.nim
trecincb.nim
trecmod.nim
trecmod2.nim
treorder.nim
tselfimport.nim even lighter version of #17938: fix most issues with UnusedImport, XDeclaredButNotUsed, etc; fix #17511, #17510, #14246 (without realModule) (#18362) 2021-06-26 15:21:46 +02:00
tseq.nim
tstrutils_insert_sep.nim
tuppercased.nim
tutils_ab.nim
UpperCased.nim