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

Towards removing this repo #209

Open
labra opened this issue Oct 6, 2022 · 1 comment
Open

Towards removing this repo #209

labra opened this issue Oct 6, 2022 · 1 comment

Comments

@labra
Copy link
Member

labra commented Oct 6, 2022

I wonder if this repo is really necessary. At the end, the repo is mostly a "catch-all" repo which contains different utilities for different purposes.

I think this is really an anti-pattern and will try to split the module into other modules/components which have a more clear name and goal.

In this issue we will keep track of the roadmap.

  • collectioncompat: will contain the es.weso.internal.utils.CollectionCompat object
  • typing: Contains a generic Typing type class, it can be extracted to its own repo
  • validating: contains a generic Checker trait that has been implemented in Cats. It was originally implemented using the Eff library. We will remove this module and create a new checker repo.
  • utilsTest: this module includes JsonMatchers which are no longer used. We may remove the whole module.
  • testSuite: this module could be extracted as a single repo

The utils folder contains the following packages:

  • json: contains several utilities to work with Json entities in Scala like DecoderUtils, JsonCompare, JsonTest and JsonTwirl. We may just create a JsonWeso repo for those utilities
  • EitherUtils contains two helper methods to work with Either values, sequence and takeSingle. I am not even sure if we use them anymore.
  • FileUtils contains some helper methods to work with files: getContents, getFileFromFolderWithExt, writeFile, formatLines, etc.
  • ...
@labra
Copy link
Member Author

labra commented Oct 7, 2022

After more thinking...maybe it is not necessary to remove the repo, but just to mode the code in the utils module to different sub-modules which can be independently published as JARs. In this way, it can be easier to update different dependencies and docs, while allowing the consumers of code from this repo to indicate which specific parts they depen on.

The final goal is not to depend on a single shared utils library with un-connected things...but to depend on more specific jars with more expressive names.

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

No branches or pull requests

1 participant