-
Notifications
You must be signed in to change notification settings - Fork 79
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
Implement Bower mass-import #95
Comments
Based on the docs, we'll need to download an archive via We can add the manifest inside the file via Not sure whether this is an issue, but the downloaded tar will store all of its content in top-level folder:
Correct me if I'm wrong, but I'm assuming we would want to remove the toplevel
|
@JordanMartinez since we'll ultimately be in control of the whole tar/untar business (spec and implementations), we can go for anything as long as we detail it properly in the spec - and I think there's value in keeping consistent with the format that gihub is using, as I feel it's slightly more convenient implementation-wise: we'll support also package destinations not on GitHub (this is not the case for Bower import though) and we'll have to clone repositories in that case. Just packaging the whole repo folder might be less messy than making folders, listing files to tar, etc |
@f-f While it might make the implementation easier, won't it make it harder for tools to extract that information later if the toplevel directory is always different? |
Could be? The amount of code that deals with that problem is exactly one line in Spago, here |
According to this comment it looks like extracting tarballs that don't have a toplevel folder is a messy business with Nix. I don't know anything about this, but maybe @thomashoneyman can confirm? |
Sorry, I don't know about this either. I don't have an opinion on the format here, though I in general prefer less processing (use whatever GitHub gives ya) as there are fewer places to check if things go wrong. |
I was just thinking that instead of special casing this as a "mass import" we could instead add a specific |
I just realized that when we convert Bower manifests at the moment, the dependencies still look like this: I believe we should remove the |
I'm having a shot at implementing this whole pipeline right now, and I now have a more concrete answer on the whole "should we keep the subdirectory in the tar archive", and my take is that "yes, we should". As it's pointed out multiple times in this SO question, not having a top level directory inside the tar archive (i.e. just packing all the files in the base level) makes it really annoying to deal with when unpacking. |
Ok, sounds good. |
We already have some code that can get all the Bower package manifests and generate our manifests, so in order to be able to do the mass-import of Bower packages to the Registry we need to implement some code that:
Note that we are planning to have CI checks for new packages, and would be good to run them for imported packages too:
Plus we should convers the semver ranges in the dependencies to simpler ones when generating the manifest, see #43
The text was updated successfully, but these errors were encountered: