Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Size-in-bytes should be explicitly indicated in config spec #42

Closed
opensorceror opened this issue Jan 3, 2019 · 1 comment
Closed
Assignees

Comments

@opensorceror
Copy link

opensorceror commented Jan 3, 2019

Size-in-bytes conversion should be explicitly (not optionally) specified by user using size | <size>. Unless this is explicitly specified, tscfg should assume it is a string by default; no implicit conversion should be done. (This is also the default behaviour of Typesafe Config.)

Example:

In each of the following cases, tscfg currently generates a variable memory of type Long, with value 53687091200.

memory: 50G
memory: "50G"

To be consistent with the default behavior of Typesafe Config, which doesn't make assumptions about types unless explicitly requested (e.g., using methods such as getBytes, getInt, etc), tscfg should instead generate a variable memory of type String, with value "50G". This should be the default behavior, unless the user explicitly requests a size-in-bytes comparison as follows:

memory: "size | 50G"

(This has been discussed at length in #41).

@carueda
Copy link
Owner

carueda commented Mar 4, 2021

Hi @opensorceror ... sorry it took a while but this has been implemented and will be available in 0.9.984.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants