Apm: Allow install via repo url and branch

Created on 25 Aug 2014  路  13Comments  路  Source: atom/apm

For those unfamiliar with Ruby Gemfiles, you can add git, github, and branch options to specify where to look for the gem.

I would like this ability in apm. It would be useful when a package is broken and the maintainer is mia. Or you would like to try a feature branch that has not been merged with master.

The only way I know how to do this now is to clone the repo and use apm link.

enhancement

Most helpful comment

@olsonpm Note that the discussion in this thread is primarily about non-standard or unusual ways of installing a package. If you simply run apm install package-name or apm install [email protected] then apm will use the _tag_ that corresponds to the version publish on apm's package list. Note that there is no restriction on the branch where that tag lives, which means your prefered way of organizing your package works just fine for regular installs.

It's only when doing non-standard installs that these oddities start coming into play, and for most cases this is when you are developing, which is exactly what apm link is for.

All 13 comments

There is also the apm develop command, though this only works for the official repository. Perhaps allowing the apm develop command to specify a Git URL would make things easier?

Thank you @lee-dohm for pointing me in the right direction.

This would be nice. I have need of allowing others to more easily try out a branch of an Atom package (https://github.com/amejia1/atom-xterm/tree/xterm.js_v3).

Perhaps allowing the apm develop command to specify a Git URL would make things easier?

@lee-dohm that would make it easier but for some reason the maintainers don't want to allow that

767 Develop git url

Would @atom be open to adding a --branch option to apm install?

I would be ok with making a pull request if I knew it wasn't going to be a waste of time with no explanation.

Thanks for pointing this out @UziTech. Since installing the master branch is already available directly via apm install and installing a branch is available by using apm link, no, I don't think that we would want to support a --branch option.

Since this is as implemented as we're going to have for the time being. I'm going to close this.

Thanks for the explanation. So we shouldn't be trying to make apm easier for developers and streamline their workflow as long as there is a way to do something? Is apm not getting updated with new features because something else is going to replace it?

No, there are no plans to replace apm with anything.

Thank you for the response. I know you guys are busy with Atom, I love helping out wherever I can and staying in the loop makes it a lot easier.

Hmm - I don't understand the implication that branches are for development. I just created an atom package where the default branch holds the source. I use webpack to concatenate all the files and thus keep the built artifacts in a 'release' branch. I will rename this branch to master for now to abide by atom's workflow, but apm install olsonpm/<package>#release would be ideal

Edit: Looks like I could just change the default github branch to release and atom plays along. Still not ideal but good'nuff.

@lee-dohm correct me if I'm wrong, but I think the idea is that apm is feature complete. Meaning everything apm is supposed to do can be done (even if it is not easy). And that the Atom team has more important things to work on. (i.e. Atom)

If you want to install a certain branch you can do the following:

  • Clone the repo
  • Checkout the branch
  • Run apm link

@olsonpm Note that the discussion in this thread is primarily about non-standard or unusual ways of installing a package. If you simply run apm install package-name or apm install [email protected] then apm will use the _tag_ that corresponds to the version publish on apm's package list. Note that there is no restriction on the branch where that tag lives, which means your prefered way of organizing your package works just fine for regular installs.

It's only when doing non-standard installs that these oddities start coming into play, and for most cases this is when you are developing, which is exactly what apm link is for.

So my misunderstanding was that I should be installing from a tag instead of a branch. That makes sense to me if so (keeps things sane and simple), and I appreciate the explanation.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

izuzak picture izuzak  路  5Comments

lexicalunit picture lexicalunit  路  9Comments

entozoon picture entozoon  路  7Comments

Hufschmidt picture Hufschmidt  路  4Comments

dm-blue picture dm-blue  路  10Comments