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

Dependency not updating correctly #267

Open
benmgreene opened this issue Mar 28, 2014 · 4 comments
Open

Dependency not updating correctly #267

benmgreene opened this issue Mar 28, 2014 · 4 comments

Comments

@benmgreene
Copy link

This was tricky to debug, so I'll need to go into some explanation.

The SCSS package was a dependency of two of my manually-added packages, Bourbon and Neat. At first install, the SCSS version was 0.8.3. Then Meteor 0.8 hits, and SCSS releases 0.8.4 to be compatible with Blaze. However, no amount of "mrt update" would bump SCSS from 0.8.3 to 0.8.4. The solution was to "mrt remove Bourbon", "mrt remove Neat", and manually remove the scss symlink in my packages dir. Only then could I "mrt add scss" and get the newest version.

I assume the desired behavior would have been to have meteorite update the dependency, yes? I did check Bourbon and Neat to see if they had locked into 0.8.3, and they did not.

@tmeasday
Copy link
Member

Hmm. This is surprising.

So the situation was that in smart.json you had "scss": {} (i.e. latest) and there was a newer version of scss than what was in smart.lock, yet when you ran mrt update it silently failed to do anything? I would have thought even if one of those other packages was holding you back it would have given a warning message..

I wonder if we can reproduce this behaviour. Do you have a check-in of your previous smart.* ?

@benmgreene
Copy link
Author

I'm afraid I don't have a check-in and can't reproduce. But no, "scss": {} never made it into smart.json, which I think was the source of the problem.

@benmgreene
Copy link
Author

Okay, I was able to reproduce this. I don't have code, but this is precisely what happened:

  1. [something a while ago] mrt add iron-router, which has dependency on blaze-layout, so blaze-layout v0.2.2 is installed.
  2. Learned that blaze-layout v0.2.3 was released, so mrt update... but blaze-layout isn't updated.
  3. Check smart.json... blaze-layout isn't there. Oh that's right, it was a dependency, so that's ok.
  4. Try to add blaze-layout directly: mrt add blaze-layout... no effect.
  5. Uninstall iron-router with mrt remove iron-router.
  6. Try to add blaze-layout again: mrt add blaze-layout... no effect again.
  7. Manually remove the blaze-layout symlink from /packages, then add blaze-layout: mrt add blaze-layout... and it grabs the new version.
  8. Re-add iron-router.

My wild guess is that meteorite is treating the symlinks in the packages directory as authoritative in a case in which it shouldn't... but I'm hoping that step-by-step is enough info for you :-).

@tmeasday
Copy link
Member

tmeasday commented Apr 4, 2014

Ahh right. Yes. I see what happened.

You are correct in your analysis. If there's a package symlinked in packages, when you call mrt add it assumes you mean that one, and doesn't go to atmosphere to fetch it. In this case that symlink was to a package that had been fetched from atmosphere but Meteorite isn't smart enough to know that.

FWIW there are times when you are better off just messing with smart.json and calling mrt install and meteor add directly.

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

2 participants