Repository navigation
Enable xbuildenv source introspection via a marker file - #414
agriyakhetarpal wants to merge 9 commits into
Conversation
There was a problem hiding this comment.
I don't think this is needed. If a user passes any metadata URL, we should assume it is a custom URL.
| replaced_path = download_path.with_name(download_path.name + ".replaced") | ||
| shutil.rmtree(replaced_path, ignore_errors=True) | ||
| download_path.rename(replaced_path) | ||
| return replaced_path |
There was a problem hiding this comment.
Well, I don't like this behavior. How about adding the source to the xbuildenv directory instead when downloading? For example, we can use 0.29.3-debug or 0.29.3-nightly instead of sharing 0.29.3. By doing that, we can remove the SOURCE_MARKER_FILE and use the directory name as the version name, which is consistent with the previous behavior.
There was a problem hiding this comment.
I don't quite get what the benefit of using a wrapped type is in this case. Of course, parse don't validate is a good practice, but do we need any validation at all for this URL?

I don't particularly like the ergonomics of this PR... hence, this is ready for review, but not ready to merge just yet and I am scouting opinions.
The idea is to have a file called
.xbuildenv-source, which will record where the xbuildenv came from – whether it's a release xbuildenv, a stable-debug xbuildenv, a nightly one, or a nightly-debug one. We can think of these as "channels". Of course, we also support custom URLs for the source of the xbuildenv, in which case we record the URL itself into the marker file.LMK what you think about this!