-
Notifications
You must be signed in to change notification settings - Fork 44
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
Include our package version in the manifest header #238
Conversation
This gives us additional control over when to consider existing artifacts as "stale" and in need of regeneration. At the moment, we require a strict version string match, but as we mature in accordance with semver guidelines, we can switch to a more fine-grained approach based on Version.compare/2. We don't need to bump the manifest version in this case because ... 1. Reads against existing manifests will safely fail and result in desirable rebuild behavior. 2. The manifest stuff is brand new, and it's unlike many folks are using it yet.
lib/mix/tasks/compile.thrift.ex
Outdated
@@ -133,21 +133,29 @@ defmodule Mix.Tasks.Compile.Thrift do | |||
end | |||
end | |||
|
|||
defp thrift_vsn do |
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.
This name makes me think it's the actual name of the version of thrift supported (e.g., 0.9.3), which kind of opens up a can of worms... so far we seem to be 0.9.3 compatible and thrift seems to be backwards compatible, but does anyone know if they have made any statements about potential for backwards incompatibility? If thrift 1.0.0 was not backwards compatible with 0.9.x, how would we handle that?
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.
Would it be clearer if I renamed this to package_vsn
?
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.
Ooh I like that. It's accurate without being overly specific.
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.
My only comment was kind of beyond the scope of this PR except maybe changing the name of the function to avoid confusion over "version of elixir-thrift" vs "version of thrift".
@jparise I just came across this today. We're using So long story short, I was thinking it might be useful to actually tag the manifest with the commit SHA somehow? |
Yes, this is essentially #138. I'm not sure how much work we want to put into this system to support our current pre-release development environment, but I'm sure we can find some sort of compromise. Let's discuss more on that issue. The current workaround is to |
This gives us additional control over when to consider existing
artifacts as "stale" and in need of regeneration. At the moment, we
require a strict version string match, but as we mature in accordance
with semver guidelines, we can switch to a more fine-grained approach
based on Version.match?/3.
We don't need to bump the manifest version in this case because ...
desirable rebuild behavior.
using it yet.