Commit graph

843 commits

Author SHA1 Message Date
Daniel M
68a9c4c955 fix and improve the behavior of nimble run
quote arguments appropriately:
  - whitespace in arguments is preserved;
    previously arguments with whitespace were split
  - quotes are now escaped

the exit code of the command that has been "run"
is re-used when nimble exits

show the output of the "run" command
regardless of whether nimble is debugging
2020-02-23 16:01:14 +00:00
Ganesh Viswanathan
27d56f8e9f Remove ~/.nimble from cache 2020-02-11 21:43:41 +00:00
Ganesh Viswanathan
85e5bc7c37 Use travis gist 2020-02-07 00:12:25 +00:00
inv2004
9391fbc56d Run can work without additional option if only one bin in .nimble (#761)
* nimble run can work if only one binary in config

* usage changed

* runFile is option now

* usage updated

* small refactoring to reduce condition

* setRunOptions fix

* some code optimisation
2020-01-17 22:15:34 +00:00
Taylor Hoff
e9d45ca683 Capitalize the "D" in srcDir to avoid errors when using styleChecks
Fixes #740
2019-11-19 22:00:15 +00:00
Xie Yanbo
16ba5db44e tests' config file should be config.nims
which is created by `nimble init`.
2019-11-10 15:30:38 +00:00
itmuckel
051cfa6cd3 Add '==' as operator for pinning versions. 2019-11-09 12:48:00 +00:00
Dominik Picheta
a8a5bdd863
Fixes #734 2019-10-29 22:43:04 +00:00
yuchunzhou
bbb586dbfc add vcs to the new created project (#729)
* add git vcs and a default .nim.cfg file to the new created project

* remove the gitapi dependency

* add vcs support for new nimble project

* add vcs support for new nimble project

* update pull request #729

* add --git/hg flag instead of --vcs flag for nimble init command
2019-10-28 21:28:46 +00:00
Dominik Picheta
b3abee937d Add tests for #666. 2019-10-24 23:26:21 +01:00
yuchunzhou
703abe3d41 fix #725 2019-10-24 00:20:40 +01:00
Ganesh Viswanathan
5bb795a364 Export initOptions for choosenim 2019-10-23 23:22:00 +01:00
genotrance
a2ec2db8f2
Enable Windows CI (#714)
Also fix #676
2019-10-03 18:38:51 -05:00
Dominik Picheta
4007b2a778 Fixes nimble run on Windows. v0.11.0
Cherry picked from 331a33711d
2019-09-23 00:09:26 +01:00
Dominik Picheta
0ed8e6403c Implicitly disable package validation for run/build/compile. 2019-09-22 22:22:21 +01:00
Dominik Picheta
901afa8c71 Further fix for #432. 2019-09-22 22:13:31 +01:00
Dominik Picheta
3625c1f861 Expand Nimble readme slightly (installation/nimble-run). 2019-09-22 21:36:50 +01:00
Dominik Picheta
b68f7849e6 Add 0.11.0 changelog. 2019-09-22 21:21:26 +01:00
Dominik Picheta
1db54cc736 Fixes some small input validation errors and help text. 2019-09-22 18:11:28 +01:00
Dominik Picheta
10e22fec98 Move issue 432 test to the bottom of tester to fix broken uninstall test. 2019-09-22 17:58:51 +01:00
Dominik Picheta
fe252c6ed6 Fixes #432. Fixes #672. 2019-09-22 16:37:47 +01:00
Dominik Picheta
281a1d129a Fixes #708. Refs #571.
Output from Nimble scripts' top-level statements is now
only visible with --verbose.
2019-09-22 14:39:22 +01:00
Dominik Picheta
a703de5dbd Attempt to reproduce #564. 2019-09-22 13:58:59 +01:00
Dominik Picheta
46dc98bb62 Fixes #710. 2019-09-22 13:34:54 +01:00
Dominik Picheta
c85cdfd814 Fixes #706. No more unused import warnings. 2019-09-22 12:00:15 +01:00
Dominik Picheta
5ea2ac34fe Update CI to test against latest Nim HEAD commit. 2019-09-22 11:53:03 +01:00
Dominik Picheta
da3f70cb98 Fixes #713 and adds test for --depsOnly. 2019-09-22 11:48:00 +01:00
Dominik Picheta
419eba036b Improve error message when there are no packages to uninstall. 2019-09-22 11:48:00 +01:00
Dominik Picheta
137bb1ed07 Fixes #606. Build before/after hook executed every time package is built. 2019-09-22 11:26:57 +01:00
Dominik Picheta
4a2aaa07dc Implements NimblePkgVersion define. Fixes #625. 2019-09-22 10:00:50 +01:00
Dominik Picheta
28ff2e04a7 Fixes tests on 0.19.6. 2019-09-22 00:15:37 +01:00
Dominik Picheta
55dd892aab Fixes #631. Test command now respects backend. 2019-09-22 00:11:28 +01:00
Dominik Picheta
c834faf60e Implements nimble run. Fixes #614. 2019-09-21 23:34:02 +01:00
Dominik Picheta
36c4a39674 Temp files are no longer removed when --debug is present. 2019-09-21 22:54:08 +01:00
Dominik Picheta
445ecfe946 Fixes #649. The dump command now has implicit -y. 2019-09-21 13:02:04 +01:00
Dominik Picheta
3eae8d7d61 Add examples to tag prompt in nimble publish. 2019-09-21 12:46:42 +01:00
Araq
bc8856632a version bump to 0.11.0 2019-09-20 20:10:06 +01:00
Araq
8bdc054817 fixes #703 2019-09-20 20:09:37 +01:00
Neelesh Chandola
d6a6a47dd9 Fix https://github.com/nim-lang/nimble/issues/700 2019-09-17 21:23:54 +01:00
Ivan Bobev
46f26e1d4a Move ignored from tests dir to its .gitignore
Related to #680
2019-09-07 12:08:15 +01:00
Ivan Bobev
1880730762 Fix the test for recursive calling of Nimble tasks
The test case for recursive calling of Nimble tasks was not working
properly on Windows so far.

Related to #680
2019-09-07 12:08:15 +01:00
Ivan Bobev
62699afaa8 Revert deletion of two not used procedures
The two currently not used procedures `getSpecificDir` and `doPull` from
`download.nim` file are reverted according to dom96's suggestion in the
code review of pull request #692. Now they are marked with used pragma
to disable the warning.

Related to #680
2019-09-07 12:08:15 +01:00
Ivan Bobev
df11a6f6cf Fix tests to pass with the latest Nim
There are two issues fixed:

 - With the latest Nim version sometimes the files
   `<package_name>_<some_number>.nims`' generated on `nim install`
   contain warning for unused imports which causes the test
   "can validate package structure (#144)" to fail, because it was
   searching for the word "warning" in the output.

 - On Windows Subsystem for Linux, when an import starts sometimes with
   a lowercase, and sometimes with an uppercase, for example
   `import uri` and `import Uri`, this causes Nim to create and compile
   both `stdlib_uri.nim.c` and `stdlib_Uri.nim.c` and to fail on the
   linking step, because of the same symbols are being redefined.

Also the Travis CI build script is changed to test against currently the
latest working Nim version 212ae2f.

Related to #680
2019-09-07 12:08:15 +01:00
Ivan Bobev
9d8cc06724 Add additional directory to .gitignore
The directory "tests/buildDir/" where the build artifacts from the
"compilation without warnings" unit test execution are being written is
added to the .gitignore file.

Related to #680
2019-09-07 12:08:15 +01:00
Ivan Bobev
f0c454a399 Fix compilation without warnings test case
Compilation without warnings test case on Unix systems with older Nim
version 0.19.6 had been failing before the fix, because the compiler
expects full file name to be passed after the '-o' switch, but not only
an output directory name.

Related to #680
2019-09-07 12:08:15 +01:00
Ivan Bobev
427b412ff9 Fix unused import warning on Unix systems
The NimbleError exception from the version module is being used only on
Windows platforms in the packageinstaller.nim file. Conditional import
of the module is used to fix the warning.

Related to #680
2019-09-07 12:08:15 +01:00
Ivan Bobev
bb1dd21224 Add an unit test for compilation without warnings
An unit test which checks whether Nimble compiles without warnings is
added. Checking for three warning types cleaned in previous commits is
implemented:

 - [UnusedImport] cleaned in e8c7d5c

 - [Deprecated] cleaned in 3d6172e

 - [XDeclaredButNotUsed] cleaned in 7df2ef3

Other types of warnings easily can be added to the test by extending the
warnings list.

Related to #680
2019-09-07 12:08:15 +01:00
Ivan Bobev
1eb9f0f01c Remove unused file
The file nimscriptsupport.nim is no longer used in favor of the newer
version nimscriptwrapper.nim.

Related to #680
2019-09-07 12:08:15 +01:00
Ivan Bobev
bfc4f25548 Fix compilation of nimscriptapi.nim
To compile the nimscriptapi.nim file, it is needed to import the os
module, but if so the getParams procedure cannot be executed from
nimscript any more. The problem is resolved by conditionally importing
the module.

Related to #680
2019-09-07 12:08:15 +01:00
Ivan Bobev
6e5761b192 Clear unused symbols warnings
Unused functions and variables are removed from the Nimble's source
code.

Resolves #680
2019-09-07 12:08:15 +01:00