Nim/tests/ccgbugs
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
..
pkg8616 Fixes 8616 (#8617) 2018-08-12 20:43:30 +02:00
m19445.c output byref types into --header file [backport: 1.6] (#19505) 2022-03-23 20:57:13 +01:00
mstatic_assert.nim fix some codegen bugs: NIM_BOOL, NIM_STATIC_ASSERT, --passc:-std=... (etc) (#13798) 2020-04-07 15:17:30 +02:00
mymodule.nim fixes #7392 (#7395) 2018-03-23 13:28:22 +01:00
t2procs.nim fixes a C code generator regression, no need to backport, only the 1.4 line is affected (#15569) 2020-10-14 13:58:36 +02:00
t5296.nim fixes #19051 [backport:1.6] (#19133) 2021-11-12 11:19:24 +01:00
t5345.nim Codegen fix for function pointers marked inline (#8866) 2018-09-04 15:28:14 +02:00
t6279.nim Improved collection-to-string behavior (#6825) 2017-12-14 14:02:13 +01:00
t6756.nim use typeof instead type (#16962) 2021-02-08 09:46:07 +01:00
t7079.nim Fixes codegen bug with literal negative zero, fixes #7079 (#7158) 2018-01-31 16:29:42 +01:00
t8616.nim lots of small changes 2018-12-11 21:23:22 +01:00
t8781.nim lots of small changes 2018-12-11 21:23:22 +01:00
t8967.nim fix marshal bugs in VM (#19161) [backport:1.6] 2021-11-17 10:15:54 +01:00
t9098.nim Fix codegen for some set operations 2018-09-28 09:59:45 +02:00
t9286.nim use doAssert in tests (#16486) 2020-12-28 14:13:21 +01:00
t9578.nim fixes #9578 (#11176) 2019-05-06 09:34:03 +02:00
t9655.nim close #9655 add testcase (#16683) 2021-01-11 18:02:32 +01:00
t10128.nim fix #10128 (#18852) 2021-09-14 19:40:42 +02:00
t13062.nim close #13062(add testcase for #13062) (#15956) 2020-11-13 12:49:30 +01:00
t13902.nim fix #13902 distinct uint64 type corruption on 32-bit with borrow (#13907) [backport:1.2] 2020-04-08 09:56:16 +02:00
t16027.nim fix #6497 (#16027) 2020-11-18 07:56:31 +00:00
t16374.nim attempt to fix #16374 (#17232) 2021-03-02 19:41:55 +08:00
t19445.nim output byref types into --header file [backport: 1.6] (#19505) 2022-03-23 20:57:13 +01:00
taddhigh.nim remove deprecated procs (#12535) 2019-11-05 11:05:46 +01:00
targ_lefttoright.nim fixes https://github.com/status-im/nimbus-eth2/issues/1549 (#16146) 2020-11-26 19:05:21 +01:00
tarray_equality.nim fixes #2498 2015-04-11 10:01:13 +02:00
tassign_nil_strings.nim --nilseqs is now a deprecated noop (#17211) 2021-03-01 20:59:43 +01:00
tborrowmagic.nim Fix semantic pass with borrowed magic procs (#8945) 2018-09-11 20:32:25 +02:00
tbug1081.nim Improved collection-to-string behavior (#6825) 2017-12-14 14:02:13 +01:00
tcapture_static.nim fixes #4551 2016-08-09 14:16:26 +02:00
tccgen1.nim tests: Trim .nim files trailing whitespace 2015-09-04 23:04:32 +02:00
tccgissues.nim refactor illegal iterator assignment detection (#12212) 2019-10-11 08:43:58 +02:00
tcgbug.nim fixes #19631 (#19618) 2022-03-20 14:02:44 +01:00
tclosureeq.nim fixes #4186 2016-06-02 17:23:39 +02:00
tcodegenbug1.nim warn about observerable stores but don't prevent them for 1.2.2 [backport:1.2]; refs https://github.com/nim-lang/RFCs/issues/230 (#14510) 2020-05-30 19:38:51 +02:00
tcodegenbug_bool.nim fix some codegen bugs: NIM_BOOL, NIM_STATIC_ASSERT, --passc:-std=... (etc) (#13798) 2020-04-07 15:17:30 +02:00
tcodegendecllambda.nim style fix: change 'JS' to 'js' to make it consistent (#13168) 2020-01-16 14:14:03 +01:00
tcompile_time_var_at_runtime.nim closes #6036 (#15779) 2020-10-30 10:00:25 +01:00
tctypes.nim add testcase for #7308 (#18849) 2021-09-14 19:39:55 +02:00
tcvarargs.nim make more tests green for C++; refs #7870 2018-10-30 16:52:33 +01:00
tdeepcopy_addr_rval.nim Create temp var in deepcopy if needed (#5205) 2017-01-15 06:26:59 +01:00
tescaping_temps.nim fixes #4721 2016-09-07 08:29:45 +02:00
tforward_decl_only.nim Refactor and doc package handling, module name mangling (#19821) 2022-05-30 18:52:19 +02:00
tgeneric_closure.nim lots of small changes 2018-12-11 21:23:22 +01:00
tgeneric_smallobj_asgn_opt.nim lots of small changes 2018-12-11 21:23:22 +01:00
thtiobj.nim Always emit hti object types if needed (#8940) 2018-09-11 17:03:21 +02:00
tissues.nim Add testcase for #14880 (#16795) 2021-01-22 13:14:28 +01:00
tlvalueconv.nim Fix #14325 (#17308) 2021-03-11 14:03:25 +01:00
tmangle.nim mangle names in nimbase.h using cppDefine (#19395) [backport] 2022-01-17 11:14:13 +01:00
tmangle_field.nim properly deprecate parseopt2 (#10452) 2019-01-25 13:13:55 +01:00
tmarkerproc_regression.nim lots of small changes 2018-12-11 21:23:22 +01:00
tmissing_ccgtrav_unique_type.nim fixes #3794 2016-01-30 15:45:45 +01:00
tmissingbracket.nim lots of small changes 2018-12-11 21:23:22 +01:00
tmissingderef.nim updated repr tests (#16147) 2020-11-26 20:00:31 +01:00
tmissingderef2.nim remove unused imports from tests 2019-11-06 14:35:45 +01:00
tmissinginit.nim megatest checks output and nimout 2018-12-11 21:23:22 +01:00
tmissingvolatile.nim testament: error instead of silently ignore invalid targets; remove pointless alias target vs targets; document matrix; DRY (#16343) 2020-12-14 10:58:29 +01:00
tnil_type.nim revert #12100; typeof(nil) is weird enough, don't allow it as the return type 2019-09-02 17:48:06 +02:00
tnoalias.nim deprecate unsafeAddr; extend addr (#19373) 2022-01-16 11:08:38 +01:00
tnocodegen_for_compiletime.nim Allow void macro result (#11286) 2019-05-21 21:31:40 +02:00
tobjconstr_bad_aliasing.nim fixes #11525 2019-06-26 23:15:58 +02:00
tobjconstr_outoforder.nim fixes #5339 2017-02-09 01:16:43 +01:00
tobjconstr_regression.nim Improved collection-to-string behavior (#6825) 2017-12-14 14:02:13 +01:00
topenarraycast.nim Fix unsound transform pass (#8633) 2018-08-14 20:38:04 +02:00
tpartialcs.nim fixes #2551; fixes #2212; breaks bootstrapping in debug mode; bootstrap with -d:release 2015-04-25 23:16:57 +02:00
tprogmem.nim testament: error instead of silently ignore invalid targets; remove pointless alias target vs targets; document matrix; DRY (#16343) 2020-12-14 10:58:29 +01:00
trecursive_table.nim fixes #1700 2015-03-24 23:07:19 +01:00
trefseqsort.nim fixes #6724 2017-11-19 00:37:36 +01:00
tresult_of_array.nim fixes #7332 (#7341) 2018-03-16 15:32:01 +01:00
tret_arg_init.nim make megatest consistent with unjoined tests wrt newlines, honor newlines in output spec (#16151) 2020-11-28 09:09:31 +01:00
tsamename3.nim type with same name in different scope now works (#17710) 2021-04-14 08:50:15 +02:00
tsequence_outoforder.nim Add testcase for #9684 (#11221) 2019-05-10 08:03:48 +02:00
tsighash_typename_regression.nim Fix edge case in type hashing (#10601) [backport] 2019-02-08 09:56:32 +01:00
tstringslice.nim made tests green again 2016-03-29 21:44:42 +02:00
tunsafeaddr.nim fixes #9403 2019-05-05 16:08:16 +02:00
tuple_canon.nim use typeof instead type (#16962) 2021-02-08 09:46:07 +01:00
tuplecast.nim fixes #4345 2016-07-19 15:40:21 +02:00
tweakopenarray.nim fixes #4089 2016-04-19 12:10:48 +02:00
twrong_discriminant_check.nim fixes #2637 2015-10-06 15:51:00 +02:00
twrong_method.nim fixes #5439 2017-02-26 17:41:00 +01:00
twrong_rc_for_refarray.nim fixes #4653 2016-08-24 11:48:21 +02:00
twrong_string_asgn.nim Resolve bugs with deep recursion of asyncdispatch. 2016-05-18 00:53:53 +03:00
twrong_tupleconv.nim use doAssert in tests (#16486) 2020-12-28 14:13:21 +01:00
twrongrefcounting.nim closes #9825 2019-05-10 11:43:58 +02:00
xarray9578.nim fixes #9578 (#11176) 2019-05-06 09:34:03 +02:00
xoa9578.nim fixes #9578 (#11176) 2019-05-06 09:34:03 +02:00
xseq9578.nim fixes #9578 (#11176) 2019-05-06 09:34:03 +02:00
xtuple9578.nim fixes #9578 (#11176) 2019-05-06 09:34:03 +02:00
xua9578.nim fixes #9578 (#11176) 2019-05-06 09:34:03 +02:00