summary refs log tree commit diff stats
path: root/tests/modules
Commit message (Collapse)AuthorAgeFilesLines
* import brackets support `as` and prefixes [backport] (#21636)metagn2023-04-181-3/+8
| | | | | | | * import brackets support `as` and prefixes fixes #21635 * copyTree -> copyNode
* set module symbol type to None instead of nil for discard check (#21657)metagn2023-04-131-0/+15
| | | | | | | * set module symbol type to None instead of nil fixes #19225 * alright
* add a prepass for codeReordering (#21513)ringabout2023-03-172-2/+1
| | | | | | | * add a prepass for codeReordering * simplify * fixes
* fixes #19795; fixes #11852; fixes #19974; remove parsing pipeline, Nim now ↵ringabout2023-02-222-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | parses the whole module at one time (#21379) * fixes #19795; remove parse pipeline * isScript * fixes nimscriptapi * don't touch reorder * check script * fixes tests * it seems implicit imports of system cause troubles * access the first child of `nkStmtList` * ignore comments * minor messages * perhaps increases hloLoopDetector * the module is a stmtList, which changes the errors * fixes nimdoc * fixes tlinter * fixes nim secret tests * fixes arc_misc * fixes nim secret tests again * safe; fixes one more test * GlobalError is the root cause too * fixes parsing errors * put emit types to the cfsForwardTypes section * fixes #11852; `{.push checks:off}` now works in procs * disable navigator * fixes nimdoc * add tests for JS * fixes nimsuggest
* defaults to ORC (#19972)ringabout2022-09-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * defaults to Orc * bootstrap using refc * use gc * init orc defines * unregister orc * fix gc * fix commands * add prepareMutation for orc * enable deepcopy for orc * prepareMutation * more fixes * some cases * bug #20081 * partial fixes * partial fixes * fixes command line * more fixes * build Nim with refc * use gc * more fixes * rstore * orc doesn't support threadpool * more shallowCopy * more fixes * fixes unsafeNew * workarounds * small * more fixes * fixes some megatest * tcodegenbugs1 refc * fxies megatest * build nimble with refc * workaround tensordsl tests * replace shallowCopy with move * fixes action * workaround * add todo * fixes important packages * unpublic unregisterArcOrc * fixes cpp * enable windows Co-authored-by: xflywind <43030857+xflywind@users.noreply.github.com>
* Refactor and doc package handling, module name mangling (#19821)quantimnot2022-05-303-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* even lighter version of #17938: fix most issues with UnusedImport, ↵Timothee Cour2021-06-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | XDeclaredButNotUsed, etc; fix #17511, #17510, #14246 (without realModule) (#18362) * {.used: symbol} * add tests * fix tests with --import * --import works without giving spurious unused warnings * new warning warnDuplicateModuleImport for `import foo; import foo` * fix test, add resolveModuleAlias, use proper line info for module aliases * fix spurious warnings * fix deprecation msg for deprecated modules even with `import foo as bar` * disable a test for i386 pending sorting XDeclaredButNotUsed errors * UnusedImport now works with re-exported symbols * fix typo [skip ci] * ic support * add genPNode to allow writing PNode-based compiler code similarly to `genAst` * fix DuplicateModuleImport warning * adjust test * fixup * fixup * fixup * fix after rebase * fix for IC * keep the proc inline, move the const out * [skip ci] fix changelog * experiment: remove calls to resolveModuleAlias * followup * fixup * fix tests/modules/tselfimport.nim * workaround tests/deprecated/tmodule1.nim * fix properly * simplify
* fix #17952: fix both false positives and false negatives for reInvalidSpec ↵Timothee Cour2021-05-081-3/+3
| | | | | | | | | (#17956) * fix #17952: fix both false positives and false negatives for reInvalidSpec * handle megatest properly * fix for tests/stdlib/tbase64.nim
* refactorings to prepare the compiler for IC (#15935)Andreas Rumpf2020-12-173-0/+14
| | | | | | | | | | | | | | * added ic specific Nim code; WIP * make the symbol import mechanism lazy; WIP * ensure that modules can be imported multiple times * ambiguity checking * handle converters and TR macros properly * make 'enum' test category green again * special logic for semi-pure enums * makes nimsuggest tests green again * fixes nimdata * makes nimpy green again * makes more important packages work
* Fix #11352 strutil.insertSep() fails on negative numbers (#15087)Bung2020-07-281-0/+13
| | | | | | | | | | | | | | | | | | | * fix #11352 strutil.insertSep handle negtive number * test for #11352 * optimize * not parts string var * Update lib/pure/strutils.nim Thanks! Co-authored-by: alaviss <leorize+oss@disroot.org> * need to be countdown Co-authored-by: alaviss <leorize+oss@disroot.org>
* Add testcase for #4796 (#14784)Clyybber2020-06-252-0/+13
| | | | | * Add testcase for #4796 * Fix test
* fixes #12420 [backport] (#12456)Andreas Rumpf2019-10-183-0/+9
|
* fixes #11872; include now gives a proper error message for all invalid infix ↵nc-x2019-08-171-0/+6
| | | | operators (#11965)
* Remove duplicate line number from 'invalid forward declaration' error (#11966)nc-x2019-08-171-1/+1
|
* fixes #11188 (#11319)Andreas Rumpf2019-05-243-0/+17
|
* fixes #11187 (#11315)Andreas Rumpf2019-05-243-0/+16
|
* Merge branch 'devel' into expand-amb-identifier-outputjrfondren2019-05-035-3/+10
|\
| * add whitespace on the right-hand side of `--`narimiran2019-05-031-1/+1
| | | | | | | | This is an em-dash, not some `--use` flag.
| * remove the restriction that module names need to be unique per Nimble… ↵Andreas Rumpf2019-04-205-3/+10
| | | | | | | | | | | | | | | | | | | | (#11064) * remove the restriction that module names need to be unique per Nimble package * make tests green again * use the 'response' linker file also on Unix in order to fix megatest
* | fix test expecting ambiguous-identifier errorJulian Fondren2019-04-291-2/+2
|/ | | | | the test is only against the first line, but testament doens't support multi-line error messages yet.
* make tests green againAndreas Rumpf2019-02-081-1/+1
|
* fix off by 1 error in `col` shown by toFileLineCol (#10138)Timothee Cour2018-12-311-1/+1
| | | | | * fix off by 1 error in `col` shown by toFileLineCol * fix test failures
* fixes #9994Andreas Rumpf2018-12-153-1/+5
|
* fixes #9978Andreas Rumpf2018-12-142-0/+9
|
* require errormsg to be specified before file.Arne Döring2018-12-1110-20/+10
|
* Fix compilation of test on linux and macNeelesh Chandola2018-12-093-1/+1
|
* Add final newlinesNeelesh Chandola2018-12-093-3/+3
|
* add testsNeelesh Chandola2018-12-093-0/+9
|
* make run the default action of a test in testerArne Döring2018-11-232-1/+12
|
* adopt testsArne Döring2018-11-081-4/+4
|
* fix testawr2018-09-041-2/+1
|
* Fix nkImportAs regression (#8796)Oscar Nihlgård2018-08-281-0/+5
|
* Fix for module alias inside brackets (#8726)Oscar Nihlgård2018-08-231-0/+11
|
* sfForward is also sfReorder for skModule symbols (#8692)LemonBoy2018-08-211-0/+1
| | | | | Take this into account while searching for undefined forward references. Fixes #8665
* implement the export/except statementZahary Karadjov2018-05-072-0/+7
|
* make the 'canimport' template workAndreas Rumpf2018-03-061-0/+19
|
* fixes #6965Araq2017-12-282-3/+10
|
* make type vs proc ambiguous handling more consistent; fixes #6726; fixes #6693Araq2017-12-152-0/+11
|
* Add sections (type, var, let, const, using) support for reorder pragma (#6326)BigEpsilon2017-10-281-7/+5
|
* reorder pass: consider the 'using' statement; disabled debug outputAndreas Rumpf2017-08-111-4/+8
|
* distinguish between 'reorder' and 'noforward'Andreas Rumpf2017-07-261-0/+42
|
* Lineinfo change (#6084)Arne Döring2017-07-171-1/+1
|
* make tests green againAraq2017-06-091-1/+1
|
* Fixes #5112 (Fix error messages raised when multiple modules have the same ↵Lolo Iccl2017-01-174-0/+14
| | | | | | original name) (#5220) Fixes #5112
* fixes #5076Araq2016-11-302-0/+14
|
* recursive modules are only detected to improve error messagesAndreas Rumpf2016-11-243-6/+5
|
* disallow recursive module dependenciesAraq2016-11-235-4/+14
|
* new language feature: explicit 'import system' statements are allowedAndreas Rumpf2016-07-071-0/+9
|
* Rename rawsockets module to nativesocketsAdam Strzelecki2015-10-031-1/+1
| | | | | | | | | | This change was done to avoid confusion with TCP/IP raw sockets. Native sockets module represents handling native system low level socket API in general and is not just limited anyhow to TCP/IP raw sockets. A stub lib/deprecated/pure/rawsockets.nim module has been added as compatibility layer for old code using rawsockets, so this change will not break existing code.
* tests: Trim .nim files trailing whitespaceAdam Strzelecki2015-09-048-21/+21
| | | | via OSX: find . -name '*.nim' -exec sed -i '' -E 's/[[:space:]]+$//' {} +