serpro69 / kotlin-faker

Port of a popular ruby faker gem written in kotlin. Generate realistically looking fake data such as names, addresses, banking details, and many more, that can be used for testing and data anonymization purposes.
https://serpro69.github.io/kotlin-faker/
MIT License
473 stars 44 forks source link

Publish always all modules #249

Closed vanniktech closed 5 days ago

vanniktech commented 4 weeks ago

I was just using the core module and wanted to also add the lorem one:

Could not find io.github.serpro69:kotlin-faker-lorem:2.0.0-rc.6.

Only to find out that it needs to be 2.0.0-rc.4. Would it be possible for you to just publish all the modules, even if there are no new changes? That's also how retrofit/sqldelight and other libraries do it.

serpro69 commented 4 weeks ago

Hey @vanniktech ,

Yeah, I've thought about that initially when I split things up into modules, but then I thought, wouldn't it just be confusing if a new module version is published w/o any changes?

Did you try to use the bom and only specify the version there? W/o specifying the individual module's versions? It's there exactly for this purpose.

vanniktech commented 4 weeks ago

Yeah, I've thought about that initially when I split things up into modules, but then I thought, wouldn't it just be confusing if a new module version is published w/o any changes?

That's how every library that I use does it. It's what I'm used to from okio, ktor, multiplatform-settings, sqldelight and many more.

Did you try to use the bom and only specify the version there? W/o specifying the individual module's versions? It's there exactly for this purpose.

Not yet. The bom version would then be 2.0.0-rc.6 or how do I know which version to use?

serpro69 commented 4 weeks ago

Not yet. The bom version would then be 2.0.0-rc.6 or how do I know which version to use?

The bom and core faker version is always the same. So try to use the latest version of the bom, it will pull the latest core faker version + versions for other modules that you include as dependency.

That's how every library that I use does it. It's what I'm used to from okio, ktor, multiplatform-settings, sqldelight and many more.

I guess they just haven't figured out a way to publish modules independently :laughing: But joking aside, yeah, I know that many other libs do it this way. I'm just not sure it makes much sense. Like, say you're using a module 2.1.0. Then a new version 2.2.0 or 3.0.0 is released, but it contains no updates whatsoever. Why would you need to be notified of that new version and bother updating to it?

The bom actually solves that problem, because it contains all the modules' versions: https://repo1.maven.org/maven2/io/github/serpro69/kotlin-faker-bom/2.0.0-rc.6/kotlin-faker-bom-2.0.0-rc.6.pom

serpro69 commented 4 weeks ago

But I will also consider your proposal :+1: One thing I don't like about the current setup is that the repo contains a ton of tags :rofl:

vanniktech commented 4 weeks ago

Like, say you're using a module 2.1.0. Then a new version 2.2.0 or 3.0.0 is released, but it contains no updates whatsoever. Why would you need to be notified of that new version and bother updating to it?

The bom doesn't help in that case, either, right?

serpro69 commented 4 weeks ago

The bom doesn't help in that case, either, right?

Well, yeah, you still need to update the version. And unless you're hard-coding versions in dependency notation strings for each module, which obviously no one does, you only need to update version in one place either way.

What I meant was more from like "communication" (can't find a right word for it) perspective. Like, it's a bit misleading that there's a new version available, which actually isn't new at all, right? Of course this should probably be solved via release notes. I get your point, it might not matter much either way. You update a version in a single place anyways, and that pulls all modules you want. Whether it's via BOM, or it just pulls same jars with a different version number - the user probably doesn't notice it.

Thanks for the good questions! :) It's definitely something to think about and I will address this before a stable release is made.

But do try the BOM at least for now, it should solve your immediate problem :)

vanniktech commented 4 weeks ago

Like, it's a bit misleading that there's a new version available, which actually isn't new at all, right? Of course this should probably be solved via release notes.

Maybe. I'm just used to it though.

But do try the BOM at least for now, it should solve your immediate problem :)

Yup, thanks!

serpro69 commented 5 days ago

OK, I'm convinced :grin: simply because having a ton of useless tags in a repo makes me sick :nauseated_face: 2.0.0-rc.7 onwards has all modules always published and with the same version :+1: