tiltfile: allow specifying a tilt version constraint#3172
Conversation
| return nil, errors.Wrapf(err, "error parsing version constraint") | ||
| } | ||
| if !rng(ver) { | ||
| return nil, fmt.Errorf("you are running Tilt version %s, which doesn't match the version constraint specified in your Tiltfile: '%s'", e.tiltVersion, constraint) |
There was a problem hiding this comment.
It would be nice to include a helpful error messaging like linking to the website saying howto upgrade.
Also explaining which version they should be running.
There was a problem hiding this comment.
It would be nice to include a helpful error messaging like linking to the website saying howto upgrade.
Good call. I'll need to make sure we a page appropriate to link to.
Also explaining which version they should be running.
Yeah, that would be nice, but I don't see a cheap way to do it with the information available, and it'd greatly increase the complexity of this feature to figure it out. We're currently logging the constraint. I'm inclined to wait to see how much use this gets / whether that's a problem before worrying about it. Also how this fits into #3125.
There was a problem hiding this comment.
Good call. I'll need to make sure we a page appropriate to link to.
https://docs.tilt.dev/upgrade.html this is what I used in my extension. tilt-dev/tilt-extensions#9
Yeah, that would be nice, but I don't see a cheap way to do it with the information available, and it'd greatly increase the complexity of this feature to figure it out. We're currently logging the constraint.
Ah, I couldn't see a log message for this, so I assumed it wasn't there.
Was just a suggestion I don't think you should complicate it too much.
|
is this PR waiting on anything? |
I was going to add a docs page with instructions for installing a specific version and link to that in the error message, but we can add that later. |
fixes #3159
uses the constraint syntax described here