[MacPorts] #52827: yarn @0.16.1
MacPorts
noreply at macports.org
Sat Dec 3 21:54:27 CET 2016
#52827: yarn @0.16.1
-------------------------+--------------------------------
Reporter: isomarcte | Owner: macports-tickets@…
Type: submission | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.3.4
Resolution: | Keywords:
Port: yarn |
-------------------------+--------------------------------
Comment (by isomarcte):
Replying to [comment:3 jambonrose]:
> This is somewhat embarrassing: I created a Portfile for yarn, having
somehow missed this issue when I started work on this yesterday. Sorry
about that, David. I did not mean to step on anybody's toes.
>
> I've opened a PR for my Portfile on Github: https://github.com/macports
/macports-ports/pull/48
>
> The Portfile in the PR (PPR) and the Portfile in this issue (PI) are
quite different.
>
> 1. PI downloads package from Github; PPR uses the yarn website
> 2. PI installs into lib and links yarn.js directly; PPR installs in
libexec and links to the yarn shell script that calls yarn.js
> 3. PI does not patch the code; PPR does (to allow for sym-linking)
> 4. PPR supports variants of Node, allows for installations of Node
outside of Macports
>
> I suspect there may be some discussion about the decisions each of us
has made, and the pros and cons here. Feedback appreciated.
>
> David: would you like me to add you as a maintainer to the Portfile in
the PR?
Hey jambonrose,
Thanks for the comment. I am not worried about you stepping on my toes. I
like many of the decisions you made, perhaps we can combine efforts.
> 1. PI downloads package from Github; PPR uses the yarn website
I have no strong opinion on this. I noticed that your version lacks a
livecheck, which is very nice to have. We get it for free by using the
github PortGroup. If you want to get `yarn` directly from their site, you
might consider adding a livecheck.
> 2. PI installs into lib and links yarn.js directly; PPR installs in
libexec and links to the yarn shell script that calls yarn.js
Well, to be more accurate, the version I created installs it into
`lib/node_modules`. This is where it would get installed if you ran `npm
-g install yarn` and where `npm` itself is installed. I certainly don't
think that there is anything wrong with installing it into `libexec`, but
the `lib/node_modules` seems to adhear to the "Principle of Least
Astonishment"
> 3. PI does not patch the code; PPR does (to allow for sym-linking)
Great idea! I noticed on the PR that it was suggested you put the
modification into a patch. I have gone ahead with this.
> 4. PPR supports variants of Node, allows for installations of Node
outside of Macports
Derp. I had the wrong `depends_run` line my `PortFile`. I have updated it
to,
{{{
depends_run bin:node:nodejs7
}}}
This way as along as they have a `node` binary in one of the standard bin
folders, they won't be prompted to install `nodejs7`.
--
Ticket URL: <https://trac.macports.org/ticket/52827#comment:4>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list