-
Notifications
You must be signed in to change notification settings - Fork 11.2k
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
Adding version to config file name closes #2731 #2734
Conversation
…old versions of Lantern closes #2731
Hey @aranhoide what do you think of this one? |
Or anyone else for that matter =). |
@@ -117,7 +117,7 @@ func doMain() error { | |||
|
|||
parseFlags() | |||
|
|||
cfg, err := config.Init() | |||
cfg, err := config.Init(packageVersion) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to use version
here instead of packageVersion
-- packageVersion
looks like it defaults to 9999.99.99
, and that's to avoid auto-updating in development mode. version
contains the current git revision so we'd get lantern-bae7606.yaml
instead of lantern-9999.99.99.yaml
which I think is more informative.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I initially just made the change but then reverted it. In production they'll be the same values, but I think in development the tricky thing is that the commit will continually change, so if you're actually testing using that yaml file like we are for #2608 you might get screwed up if you're development pattern involves committing locally a lot, for example.
Does that make sense?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @atavism!
packageVersion
was initially intended for autoupdates only. If no VERSION
is passed to the Makefile it will use the git revision and when compiled in development mode it will use 9999.99.99
. I think the git revision would be more informative but I also think it would be harder to associate it with an actual release, as we'll always have to lookup the git revision.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I agree @xiam. Also in production they're always the same regardless.
LGTM |
Adding version to config file name closes #2731
Thanks guys! |
This just adds the Lantern version to the yaml config file name on disk. That prevents Lantern from ever reading config files from old versions, which I think is exactly what we want.