-
-
Notifications
You must be signed in to change notification settings - Fork 631
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
pants.ini [binaries] section no longer applies after move to bootstrap options #4917
Comments
One idea might be to add a pants/src/python/pants/option/options.py Line 81 in b170aeb
|
The cmd-line flags (and even env vars) still work, right? I tried to naively see if We used to have a script that "migrates" the config file. How about resuscitating that, and running it at pants startup during the deprecation cycle? It could error out but give a sensible message on how to fix. Or - since this is a one-off kind of thing, we could hard-code some special-casing in the config parser... |
@benjyw : Is my suggestion of allowing the deprecated scope to be specified on individual options reasonable? |
the migration script approach is interesting, but iirc that only provided suggestions and had to be manually run. I'll have to think more about that idea, but it'd be ideal to not have to ship a sidecar solution I think. I'm currently leaning towards special casing a plural still trying to figure out how best to wire that all up - let me know if you have any high level design thoughts. |
While considering this, I tried to add
Whether However @stuhood's suggestion of allowing deprecated scopes on individual options might allow for solving these problems. Certainly it would then not be necessary for |
There are other complications. For example, we have to "complete" the set of known scopes before we register any options. Fortunately the 'binaries' scope still exists on the BinaryUtil.Factory subsystem, so it will get pulled in when we register the full options. But not when we register the bootstrap options. Currently those assume that the only scope that matters is the global scope. |
Yep, after trying to get this to work for a bit, my sad conclusion is that supporting non-global scopes during options bootstrapping is going to be quite disruptive, and I'm not sure it's worth it. I honestly think that, since cmd-line flags and env vars will work, so the only problem is config files, that we special case this somehow (e.g., in the options parser) and not worry about the general case. Moving existing options into bootstrap options should hopefully be a very rare thing. How about a wrapper around the config reader that does the transform implicitly? |
sgtm |
reviewable: #5007 |
in #4846 I landed a change to move the binaries options to bootstrap options. this seems to have had the unintended side effect of making the
[binaries]
section no longer work inpants.ini
:flattening these as e.g.
works as expected tho.
it's not clear to me if this is a violation of the deprecation policy, but I'm also not sure how we can more cleanly migrate these options to bootstrap. posting here mainly for posterity but also to raise a discussion on the broader issue.
The text was updated successfully, but these errors were encountered: