couchdb icon indicating copy to clipboard operation
couchdb copied to clipboard

Create couch_lib application

Open iilyak opened this issue 2 years ago • 3 comments

Overview

This is a cherry-pick of a https://github.com/apache/couchdb/commit/845f917e35005a84ee790cd9cb9918d0b5be25ef from main into 3.x.

Testing recommendations

Usual ./configure && make would be sufficient since this commit doesn't provide new functionality.

Related Issues or Pull Requests

  • https://github.com/apache/couchdb/pull/3529

Checklist

  • [x] Code is written and works correctly
  • [ ] Changes are covered by tests
  • [ ] Any new configurable parameters are documented in rel/overlay/etc/default.ini
  • [ ] A PR for documentation changes has been made in https://github.com/apache/couchdb-documentation

iilyak avatar Dec 02 '21 13:12 iilyak

Wonder if it would make sense to add/move some functions to it as it seems a bit odd to commit an empty application. Or, do you think it's better to first have the app first, then plan on moving helper functions into it?

Just afraid most committers won't even know about it and will just keep adding functions to couch_util and the app will just stay empty for quite a while.

nickva avatar Dec 03 '21 19:12 nickva

Wonder if it would make sense to add/move some functions to it as it seems a bit odd to commit an empty application. Or, do you think it's better to first have the app first, then plan on moving helper functions into it?

Just afraid most committers won't even know about it and will just keep adding functions to couch_util and the app will just stay empty for quite a while.

The original PR https://github.com/apache/couchdb/pull/3529 contained some functions.

  • couch_lib_parse:parse_boolean/1 - parses given string or binary into Erlang's boolean() type
  • couch_lib_parse:parse_integer/1 - parses given string as Erlang's integer() type
  • couch_lib_parse:parse_non_neg_integer/1 - parses given string as Erlang's non_neg_integer() type ([0..infinity))

However I was afraid pulling them here since there is no immediate need in them.

iilyak avatar Dec 03 '21 19:12 iilyak

There is nothing in couch_lib, what is the value of this work?

rnewson avatar Dec 03 '21 22:12 rnewson