* [refactor] msgs: toFilename now return just the filename
The C codegen uses just the file name for stacktrace when
excessiveStackTrace is off (see quotedName),
so there aren't any reason for other codegen to not do the same.
The file name is now cached in TFileInfo.shortName, which was introduced
for nimsuggest, and went unused after several refactoring of the
compiler.
A toProjPath() proc has been added for the previous behavior of
toFilename().
* ccgstmt: use quotedFilename() for raiseExceptionEx
This is the same proc used for stacktrace when --stacktrace:on
Fixes#11572
* msgs: handle case where file name is not available
(cherry picked from commit e259f80fc7)
Add possibility when "koch tools" command is used, nim compiler options
to be passed. The current options are kept and the new user specified
options will be added to the end of the command line if present.
Example:
> koch --latest tools -d:danger --debugInfo --lineDir:on
bin\nim.exe c -o:bin\nimsuggest.exe -d:release -d:danger -d:danger
--debugInfo --lineDir:on nimsuggest/nimsuggest.nim
...
bin\nim.exe c -o:bin\nimgrep.exe -d:release -d:danger --debugInfo
--lineDir:on tools/nimgrep.nim
...
bin\nim.exe c -o:bin\vccexe.exe -d:danger --debugInfo --lineDir:on
tools/vccexe/vccexe.nim
...
bin\nim.exe c -o:bin\nimpretty.exe -d:release -d:danger --debugInfo
--lineDir:on nimpretty/nimpretty.nim
...
bin\nim.exe c -o:bin\nimfind.exe -d:release -d:danger --debugInfo
--lineDir:on tools/nimfind.nim
...
bin\nim.exe c -o:bin\nimble.exe --noNimblePath --nilseqs:on -d:release
-d:danger --debugInfo --lineDir:on dist\nimble\src\nimble.nim
(cherry picked from commit 5be5bf0222)
* [bugfix] fix#11469, new rules for a newline in nimpretty
* concatenate two lines if they have the same indentation level
(cherry picked from commit f288e1b11a)
* compiler/msgs: toMsgFilename now operates on FileIndex
* compiler/reorder: use toMsgFilename for compiler messages
* compiler/semstmts: respect listFullPaths for recursive deps error
(cherry picked from commit 993b3909a8)
* compiler/[msgs, options]: make toFilename independent of listFullPaths
toFilename is used mainly in codegen, as such it should not follow
--listFullPaths
* compiler/msgs: use toMsgFilename for toFileLineCol
This proc is mainly used for compiler messages, so it should follow
--listFullPaths
* compiler/msgs: remove toFileLine
unused proc
* compiler/msgs: cleanup toMsgFilename
Also improved path choosing logic, /home should now be preferred over
../home on *nix
(cherry picked from commit 2f1a1b7106)
When an HTTP request with a zero CONTENT_LENGTH is made,
attempting to access addr(result[0]) raise an exception as the 0 index
is out of bound
(cherry picked from commit 181350f6c9)
* Documentation of NimScript, update and expand, mention the benefits aside of its limitations, add examples, update the list of usable std lib modules
(cherry picked from commit bb9b60604b)