-
Notifications
You must be signed in to change notification settings - Fork 34
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
Prevent downstream (consumer lib.) warnings #121
Prevent downstream (consumer lib.) warnings #121
Conversation
I'm bumping the rebar3 patch version, only, since going back to OTP 17 is a stretch for it. I'm not sure it'll work (let's see what CI says). |
Its fine if we can only regenerate pb modules on latest rebar, we only need to do it once and we have ci to ensure the generated Erlang code works on old OTPs. |
Sure, but CI failing on rebar3 (e.g. for a failure that leads to calling |
The plugin also pulls |
Why would debugging be problematic pre-22? What do you propose instead? gpb should be a dev dependency, its only needed for hex_core development, it shouldnt be a runtime dep for downstream packages. |
Yes I would like to lock it still. You are right that the files would be regenerated under specific circumstances but id like to avoid a situation where we have unnecessary churn in them because someone happened to pull in a gpb version that was more recent. I think it is important to have precise control of the version and bump it explicitly not accidentally. |
I agree, I also like to use precise versions in most circumstance. But since this wasn't being done, and I knew not the history behind it... 😄 I'm rebasing the initial change to then show the update to 4.17.5 after rm. |
Because 3.16 contains code that won't run pre-22, most surely, (at least pre-21) like the new
Maybe lock other rebar3 versions (per older OTP version) and hope for the best (?) You can also think about bumping from 17, but that's your call.
Sure. If you use |
Lock where? Sorry, I'm totally lost, I must be missing something. My understanding is hex_core codebase is mostly independent of the rebar3 version. The dependant bits are I suppose the contents of
We locked the gpb version but only like 2 weeks ago :D |
Okay, yeah, naming and context is important, sorry. So, when I say "lock the gpb version" I don't mean "have it explicit in rebar.config"; I mean "have it locked in rebar.lock". When I say "lock the rebar3 version" I mean "lock it in the GHA file". We might want that if using latest on older Erlang versions fails (which most surely will if you use a OTP 17 / rebar3 3.16.0 combo, for example).
And that's what I want to keep also, but that might (as explained) need to force a rebar3 lock in the GHA yml file. It's doable.
Got it. At the same time, when you say "locked" you mean you "made it explicit" (as you did, in the dev profile). I'm not sure rebar3 will always honour non-rebar3.lock versions, especially when dealing with plugins, but I'll be sure to test this as much as possible. |
And now for the fun part. It seems gpb 4.17.5 introduced some stuff regarding versioning that I don't know yet (so will have to). In the meantime I'm push a not-yet-final version of stuff, so you can see how the updates (per commit) would happen in the future. |
Converted to draft since it's ongoing and might change a bit... |
Yeah, sorry about any confusion. My understanding is |
Nah, if you lock it there, dependants will pull it, for no reason. There isn't a concept of development dependencies yet 😄 I'm struggling with the newer version of gpb (inside the dev profile) since it seems there's a new option for .vsn and stuff and... still reading! Note: tomas-abrahamsson/gpb#207 opened, to understand what's up with 4.17.5+, since we need 4.17.6. |
Apart from the failing CI, this is rebar.config form I think is Okay. Edit: actually, CI not failing any more. |
@wojtekmach, let me know if anything else is required. I'm still going to test this with |
Oh, it just worked as a dep after all? Sorry for wasting your time. Looks good to me, lmk after you've done your tests and I'll merge this. Thanks! |
No time wasted, no worries. |
I tried downgrading to 4.17.0 and re-creating modules and I'm seeing they were generated with 4.17.6 (in other words, they haven't changed at all). What am I doing wrong?
|
Try deleting |
|
Yeah, just saw it. 😄 |
I get the same as you :) it's possible the plugin is locking a different version (but in its |
my rebar.lock is empty:
|
oh, you are saying the plugin locks a certain version, never mind. |
What's odd is that |
We should be able to dictate what happens, at a higher level
I pushed a small update, to tweak the plugin's dep. list. Delete _build and restart. I'm also asking around, in rebar3's Slack if there's a better solution. |
Fantastic, thank you! |
Cool. |
This is "part 2" of #120, where I only bump
gpb
, regenerate the proto-code files and lock to a specificgpb
version, as per comments in that pull request.