Commit Graph

120 Commits

Author SHA1 Message Date
jangko a1f3b22bbe
fix ci for nim 1.6 and devel
- rm -f nimble.lock to allow nim 1.2,1.4,1.6, and devel run test with nimble
- upgrade ubuntu runner to 20.04
- upgrade github actions to v3
2023-02-12 13:05:41 +07:00
Kim De Mey f6acc5e3da
Add custom Enum parser proc to keep Nim 1.2 behaviour for configs (#63) 2023-01-26 10:42:14 +01:00
Luke 56f4db90f7
Update confutils.nimble (#57)
Co-authored-by: Jacek Sieka <jacek@status.im>
2022-11-23 19:30:59 +01:00
Jacek Sieka 269c17401d
update CI, normalise nimble (#61) 2022-11-23 17:30:29 +01:00
jangko a26bfab7e5
fix config file test due to toml-serialization changes 2022-09-23 09:45:15 +07:00
Miran b098d9ea85
move `-d:nimRawSetjmp` to config.nims (#54)
* move `-d:nimRawSetjmp` to config.nims

Refs https://github.com/status-im/nimbus-build-system/issues/44

* use .cfg not .nims
2022-09-03 08:35:01 +02:00
Ivan Yonchovski 40c6f0b378
Add setup files (#55) 2022-07-12 23:33:45 +03:00
Zahary Karadjov 5d0d864510
FieldTag no longer requires specifying the FieldType 2022-06-18 13:30:42 +03:00
tersec fc03a0c4e1
rm TaintedString for string; some proc -> func (#53)
* rm TaintedString for string; some proc -> func

* procs which interact with macros in certain ways can't be funcs in Nim 1.2
2022-06-03 18:24:59 +00:00
jangko d06f6187dc
fix #49: field type with qualified ident 2022-05-10 12:18:06 +07:00
jangko 8f8f715f76
fix nnkAccQuoted entry processing in config-file
fixes #47
2022-04-16 18:28:38 +07:00
Dustin Brody 60d71e8029
rm obsolete/unused/unmaintained CI AppVeyor and Travis scripts 2022-04-03 08:09:46 +00:00
tersec a4f51237fc
add parseCmdArg tests; fix 64-bit int parsing on 32-bit platforms (#44) 2022-03-23 14:30:29 +02:00
Ștefan Talpalaru 9826fddd1c
fix corner case with custom pragma (#42)
The AST changes when you call the same custom pragma more than once.
2022-03-11 14:28:28 +01:00
Zahary Karadjov 585059d2fb
Remap serialization errors to ConfigurationError 2022-03-09 17:21:56 +02:00
Zahary Karadjov 375b6276ca
Don't use fully qualified enum values as the names of TOML file sections - use the short enum name instead 2022-03-09 17:12:11 +02:00
Zahary Karadjov 0a88d30e00
Clean up the obsolete config loading code; Fix the tests 2022-03-05 15:07:57 +02:00
Zahary Karadjov 0fc26c5b25
Bugfixes for the config file support
- The config files processing was not taking into account the `name`
  pragma of the configuration object fields.

- The required fields were not searched within config files before
  reporting an error that they are missing.

- Fields with the same names were not supported in different case branches

- The loaded config file path can now depend on the configuration
  supplied through the command-line.
2022-03-04 23:24:58 +02:00
Kim De Mey 05a438414a
Enable --styleCheck:usages (#41) 2022-02-24 21:43:04 +01:00
Ștefan Talpalaru 0435e67832
CI: test with multiple Nim versions (#38)
* CI: test with multiple Nim versions
2022-01-04 17:21:15 +01:00
jangko 6a56d01381 feature: add `ignore` property in addition to `hidden`
you can still set the value of a hidden option,
it just dont show up in the help text.

but using `ignore`, the is no chance you can set the value from cli.
2021-12-01 13:59:38 +02:00
jangko 0f4961822d feature: multiple lines long description
line break char: '\n', '\r'
example:
 -x, --name   regular description [=defVal].
              longdesc line one.
              longdesc line two.
              longdesc line three.

why additional pragma?
- to keep the default value not too far away from the 'name'.
2021-11-30 20:09:45 +02:00
jangko 7176de4ddb ci: fixes mingw download url, replace space with %20 2021-09-08 19:09:05 +03:00
jangko aa0ff5b0dc feature: separator text when displaying help
SEPARATOR:
-abbr, --name desc
-abbr, --name desc

---------
-abbr, --name desc
-abbr, --name desc
-abbr, --name desc
2021-09-08 15:56:51 +03:00
jangko 0cd09d75c8 add compile time check to detect duplicate abbr and duplicate name 2021-09-08 15:53:44 +03:00
Ștefan Talpalaru ab4ba1cbfd
CI: refactor Nim compiler caching (#30) 2021-06-03 02:46:21 +02:00
Zahary Karadjov 6036a47000
Bugfix: parameters having empty strings as default values were treated as mandatory 2021-05-18 11:01:11 +03:00
Zahary Karadjov 4c19475a01
Bugfix: allow multiple positional arguments in sub-commands 2021-05-17 23:08:18 +03:00
Zahary Karadjov 5f7cfa8d98
Allow defaultValueDesc even without defaultValue; Cosmetic changes 2021-05-17 20:40:57 +03:00
Zahary Karadjov 5f2f882151
Print the values of invalid parameters in error messages 2021-05-17 19:52:35 +03:00
Zahary Karadjov bb6cbf6e0d
Display the default values of parameter in the help messages 2021-05-16 21:42:12 +03:00
Zahary Karadjov d1a45cfa9a
Some steps towards fixing #19 2021-05-16 19:13:06 +03:00
Zahary Karadjov 66a17f6d23
Handle hidden parameters in config files 2021-05-16 19:08:51 +03:00
Zahary Karadjov c222804b3b
Support default values for seq[T] parameters 2021-05-16 17:49:56 +03:00
Zahary Karadjov f091a70a5b
Handle changes in the serialization library 2021-03-19 04:01:44 +02:00
Zahary Karadjov cfa9566191
Allow setting hidden parameters from the command-line 2021-01-29 23:17:15 +02:00
andri lim c4cd4c2474
Merge pull request #28 from status-im/github_action
add github action
2020-12-26 11:35:52 +07:00
jangko 4397988eb5
fixes nimble dependencies in github action script 2020-12-24 12:50:59 +07:00
jangko 3db6911e53
add github action script 2020-12-24 12:23:24 +07:00
andri lim 10de7aa443
Merge pull request #27 from jm-clius/export-options
Added exporting of std/options
2020-11-24 16:20:33 +07:00
Hanno Cornelius 282c7b1d9a
Added exporting of std/options 2020-11-18 09:15:48 +02:00
jangko 29c4a1870f implement config file tests 2020-11-02 16:17:51 +02:00
jangko f3a048f9ea config file integration into confutils 2020-11-02 16:17:51 +02:00
jangko 085d52d3ad fixes winreg Option[T] decoder 2020-10-29 13:52:31 +02:00
jangko 1e1ba43af2 separate public types and private utils 2020-10-29 13:52:31 +02:00
jangko 4304251b09 winreg encoder-decoder implementation 2020-10-29 13:52:31 +02:00
jangko 0df747294e initial winreg implementation 2020-10-29 13:52:31 +02:00
jangko b961fbe7b4 fixes envvar Option[T] decoder 2020-10-29 13:52:16 +02:00
jangko f4087c1789 fixes string encoding for envvar serialization 2020-10-29 13:52:16 +02:00
jangko a263d76bc0 envvar encoder decoder implementation 2020-10-29 13:52:16 +02:00