You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Minor legacy code smell: Context.dist_dir is a quite different place to Bootstrap.dist_dir #1626
I found a minor legacy code smell but it is rather confusing for newcomers and myself alike:
Context.dist_dir is a quite different place to Bootstrap.dist_dir: the former is the entire "dists" directory with all distributions, the latter is actually the specific one for the current build. So to get the distribution folder during the build, ctx.dist_dir is actually wrong, but ctx.bootstrap.dist_dir is correct - at least if I'm not mistaken. The relevant code commend in build.py in the Context class definition is also pretty much wrong, or at best misleading:
# the Android project folder where everything ends up
dist_dir = None
(it's not the Android project folder itself but the parent, since ctx.dist_dir != ctx.bootstrap.dist_dir)
This naming is confusing and IMHO really should be changed. I think Context.dist_dir is a bad name and should be something different, since it's not actually where the final distribution is.
Suggestions? How do you all like ctx.dists_parent_dir instead of ctx.dist_dir? Open for other ideas
Activity
inclement commentedon Jan 30, 2019
Based on the comment, I think this is actually a bug (i.e. originally it was intended to be what the comment says). Thanks for pointing it out.
dists_parent_dir sounds good for me, or dists_root_dir or anything like that.