summary refs log tree commit diff stats
path: root/compiler/modulepaths.nim
Commit message (Collapse)AuthorAgeFilesLines
* Refactor and doc package handling, module name mangling (#19821)quantimnot2022-05-301-94/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* Add changes required by Nimble lock file support (#12104)Ivan Bobev2021-07-151-1/+1
| | | | | | | | | | | | | | | | Implemented support for Nimble local cache with package directories with a checksum of the package at the end of their names. Now the compiler supports package paths in the form: * /path_to_nimble_cache_dir/pkgs/package_name-1.2.3- FEBADEAEA2345E777F0F6F8433F7F0A52EDD5D1B * /path_to_nimble_cache_dir/pkgs/package_name-#head- 042D4BE2B90ED0672E717D71850ABDB0A2D19CD2 * /path_to_nimble_cache_dir/pkgs/package_name-#branch-name- DBC1F902CB79946E990E38AF51F0BAD36ACFABD9 Related to nim-lang/nimble#127
* Big compiler Cleanup (#14777)Clyybber2020-08-281-4/+2
|
* Cosmetic compiler cleanup (#12718)Clyybber2019-11-281-2/+2
| | | | | | | | | | | | | | | | | | * Cleanup compiler code base * Unify add calls * Unify len invocations * Unify range operators * Fix oversight * Remove {.procvar.} pragma * initCandidate -> newCandidate where reasonable * Unify safeLen calls
* [refactoring] remove unused imports in the compiler and in some stdlib modulesAraq2019-07-181-1/+1
|
* styleCheck: make the compiler and large parts of the stdlib compatible with ↵Araq2019-07-101-1/+1
| | | | --styleCheck:error
* fixes #10042 (allow spaces in import) (#10504)Miran2019-01-311-1/+0
| | | | | This allows spaces in imports, by using the following syntax: * `import "directory with spaces" / subdir / file`, or * `import "directory with spaces/subdir/file"`
* Deprecate gc v2 (#10151)Neelesh Chandola2019-01-011-1/+1
| | | | | | * Deprecate gc v2 * warnDeprecated now has custom messages
* compiler refactoring; use typesafe path handing; docgen: render symbols ↵Andreas Rumpf2018-09-071-4/+3
| | | | between modules
* Fix for module alias inside brackets (#8726)Oscar Nihlgård2018-08-231-7/+0
|
* Deprecate the dot style for import paths (#8474)Oscar Nihlgård2018-07-301-0/+1
|
* Fix path resolution of submodules in the std namespace (#8453)Oscar Nihlgård2018-07-301-16/+4
|
* refactoring: remove idents.legacy global variable and pass the IdentCache ↵Andreas Rumpf2018-05-271-1/+1
| | | | around explicitly
* remove more global variables in the Nim compilerAndreas Rumpf2018-05-271-1/+1
|
* preparations of making compiler/msgs.nim free of global variablesAndreas Rumpf2018-05-171-2/+2
|
* move more global variables into ConfigRefAndreas Rumpf2018-05-111-1/+1
|
* big refactoring: mores stuff compilesAndreas Rumpf2018-05-101-13/+13
|
* refactoring: make FileIndex a distinct type; make line information an ↵Andreas Rumpf2018-04-211-1/+1
| | | | uint16; fixes #7654
* disable the undocumented 'import ' feature; allow import std / strutils; ↵Andreas Rumpf2018-02-121-94/+107
| | | | fixes #2819; refs #6700
* fixes the new to be documented importsAndreas Rumpf2017-11-051-2/+4
|
* made nimresolve part of the compilerAndreas Rumpf2017-10-291-1/+95
|
* Add sections (type, var, let, const, using) support for reorder pragma (#6326)BigEpsilon2017-10-281-0/+78