Skip to content
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

bower2nix includes ~ in generated versions #3

Closed
Baughn opened this issue Jul 7, 2016 · 6 comments
Closed

bower2nix includes ~ in generated versions #3

Baughn opened this issue Jul 7, 2016 · 6 comments

Comments

@Baughn
Copy link

Baughn commented Jul 7, 2016

E.g. for a bower.json such as this:

{
  "name": "jupyter-notebook-deps",
  "version": "0.0.1",
  "dependencies": {
    "backbone": "components/backbone#~1.2",
    "bootstrap": "components/bootstrap#~3.3",
    (snip)
  }
}

...the generated .nix file will include ~ in the version number:

 (fetchbower "backbone" "components/backbone#~1.2" "components/backbone#~1.2" "1arcv99907bzr84lfrm9qyv0l8al653p6m4ih188n2dz8dd7n6ls")
 (fetchbower "bootstrap" "components/bootstrap#~3.3" "components/bootstrap#~3.3" "1vf8wylj51dh3gkjasnifpycvsfaxjci9hj4vd5q028ck7fprk8g")

Not only does this break bowerVersion, but it would also make the fetch non-fixed in the event that bowerVersion were fixed.

You do handle ~-ranges correctly in other cases; at the moment, I suspect it's the hash that's throwing it off.

@rvl
Copy link
Owner

rvl commented Jul 8, 2016

It is indeed the hash which is throwing it off. I'm not even sure what #~1.2 is supposed to mean. In this case I suggest tweaking the generated nix until a solution can be found.

@Baughn
Copy link
Author

Baughn commented Jul 8, 2016

It seems to mean.. "Look for GitHub releases matching this version, approximately; install that."

@johbo
Copy link
Contributor

johbo commented Aug 30, 2016

It seems to work if we use the source specifier and the resolved version, e.g. components/bootstrap#3.3. Without the source specifier (e.g. just 3.3) I ran into trouble because it looked in the wrong place.

@johbo
Copy link
Contributor

johbo commented Aug 30, 2016

I've added my workaround in #6

@rvl
Copy link
Owner

rvl commented Aug 30, 2016

Thanks @johbo, workarounds are good. I will check & merge later.

rvl added a commit that referenced this issue Sep 10, 2016
@rvl
Copy link
Owner

rvl commented Sep 10, 2016

Fixed by 16521d4, sorry for the delay.

@rvl rvl closed this as completed Sep 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants