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
Make os packages mutually exclusive #40
Comments
A prototype of this is here: https://github.com/LumaPictures/rez/tree/versions |
Hey Chad, Wrt the pkgs and dependencies you're going with, that looks right to me. I'll be starting work on a new version submodule soon. In the meantime os-w for windows arch-i for i386 On Friday, November 15, 2013, Chad Dombrova wrote:
|
I posted before I was actually ready. check github for the final post. all of the work is done. i added label versions and added the os packages. On Fri, Nov 15, 2013 at 5:02 PM, allan johns notifications@github.comwrote:
|
to accomplish label versions i had to make a change to the heart of the resolving algo, but i wrote a bunch of tests beforehand to be sure that the results were the same after the refactor. rez was iterating through available packages in a somewhat inefficient way. it would ask for a version in range "0+<5", then if the resolved failed, it would move to "0+<4", then to "0+<3", etc, always setting the new upper bound to the value of the last failed version: ver_range_valid = ver_range_valid.get_intersection(VersionRange("0+<" + pkg_req_.version)) each time that newly formatted range was passed to the reason i tackled this problem is because replacing the "next valid version" logic with an iterator made adding "label" versions possible, because it removed the need for labels to work with the numeric version range syntax, which would not have made sense. have a look and let me know. i'm just about done with the changes i need to get rez up and running here. i just need to write some more tests and make certain that everything is working cross-platform. |
Hey Chad, Yeah that rings a bell. It's funny, some inefficiencies I didn't bother Version aliases - I get what this is, but how do we avoid the problem where (windows-6, windows-vista@) If the trailing @ gets pulled in as part of the arg (which will be often A On Fri, Nov 15, 2013 at 7:03 PM, Chad Dombrova notifications@github.comwrote:
|
what i'm calling "label" versions are different from aliases. a version alias must have an underlying numeric version, but a label version is a valid version in its own right: like a numeric version it has its own sub-directory, and is supplied as the version in the package.yaml. i don't think that it should be legal for a package to mix label and numeric versions: either a package has a standardized, hierarchical version convention or it doesn't. attempting to mix the two makes for some pretty nasty situations in the so, in the example that you've given, the version two alternate solutions that will help people learn about aliases: a more fully featured version alias tab-completion has a tricky technical problem lurking, which is that many package.yaml files must be read in order to know them. it might make sense to put the mapping in a family-level name : windows
version_aliases :
vista : 6.0
2000 : 5.0 lastly, I thought I should point out that I won't actually be implementing this now, since I don't need it to get rez rolled out here. we should probably split this discussion into a separate ticket. |
i have a question for everyone regarding the e.g. do you like this better:
or this:
(keeping in mind that you won't actually need to type these at the command prompt) i can sense that there will be some confusion over the name |
On Monday, November 18, 2013, Chad Dombrova wrote:
|
sounds awesome. i would beg a favor from you: can you start from my changes? i'm still pretty anxious that i'm going to end up with my own unmergable version of rez. what i've done in my versions branch:
agree.
good point. |
oh, forgot to mention that the versions branch also changes the os packages from e.g. |
Am not really sure i guess. Are we still supporting Architecture? I always referred to a platform as OS+HW (e.g. linux-x86). So i guess i'd vote for OS. |
On Monday, November 18, 2013, Chad Dombrova wrote:
Speaking of merges, before I branch off your version branch, would you be
|
the current also, i made
already done. i have a few minor things to cleanup on the version branch, but it's mostly ready to go. |
On Monday, November 18, 2013, Chad Dombrova wrote:
|
Personally I prefer Would |
yup. |
btw, I also prefer |
I'll go with that. On Monday, November 18, 2013, Chad Dombrova wrote:
|
ok, one more opinion call:
-chad |
I say plat for no particular reason besides liking the alignment more than disliking the obscurity ;) |
testing (going thru work firewall - please ignore) |
Ok all, I'm starting on Rez work here at my work. One of our goals is to use Rez to share software across all of our worldwide studio locations. In order to do this, we have to have agreement over every site that a package with a given name and version, is the same thing at one studio as it is at another. For example, the package representing the linux platform would have to be called, say, "platform-linux" at every site. So from my POV we need to get a standard naming convention nailed down very soon, and have agreement across the board on it. I feel like we've gotten close on this thread, but not quite there - for instance, 'plat' or 'platform'? What are the exact platform names, and how are they chosen? Can we use python's platform module as a yardstick for some of this? Etc etc. Thx all |
To kick off the discussion again, I have two points: plat vs platform. Either way I agree with this name, it is more correct than 'os'. I vote for 'platform' though... whilst 'arch' is also a shortening, it's a well known one, and 'plat' is not, for that reason only I think we should avoid it. Chad in your example above where you showed all the various 'windows' packages, isn't the problem here that various os-packages are not mutually exclusive? For example, you could resolve both a fedora and an ubuntu package into the same env, but this will more than likely cause problems. Shouldn't we take the same approach to os as we do to platform? Consider:
|
I prefer In the thread about making Rez pure python we discussed a
That does seem like quite a neat solution. Would the |
Is this implemented? :) |
Yes, we've standardized on platform/arch/os packages for a long time now.
That's juts default behavior though, you're free to do this as you'd like.
Note this entry in rezconfig.py:
implicit_packages = [
"~platform=={system.platform}",
"~arch=={system.arch}",
"~os=={system.os}",
]
https://github.com/nerdvegas/rez/wiki/Basic-Concepts#weak-references
Some packages may not be platform dependent, hence the weak references.
Hth
A
…On Mon, Apr 22, 2019 at 11:41 PM Marcus Ottosson ***@***.***> wrote:
Is this implemented? :)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#40 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAMOUSQD33XHAKAK3ZJXRE3PRW6BTANCNFSM4AJW7BSQ>
.
|
Last week I started experimenting with using rez on linux and osx, and quickly discovered that OS packages are not mutually exclusive (I think I may be the first person actually using rez on two operating systems at the same site). There is nothing stopping a resolve on osx from pulling in packages that require Linux. Making Linux and Darwin anti-packages of each other only protects against bad resolves by aborting the resolution.
My plan is to create an "os" package, with versions per os:
os-darwin
,os-linux
,os-windows
. Versions are inherently mutually exclusive, so it will preventos-darwin
andos-linux
from being loaded simultaneously, and thus allow packages that require or vary on these to resolve properly.To achieve this, we will first need to implement a new type of
Version
subclass that supports a string label.similarly, architectures can be implemented with
arch-i386
andarch-x86_64
packages.lastly, specific versions of an operating system can be implemented as their own packages. e.g.
osx-10.8.1
,fedora-19
, etc. Here are some complete examples from windows, with numeric versions taken from wikipedia.The text was updated successfully, but these errors were encountered: