-
Notifications
You must be signed in to change notification settings - Fork 18
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
The adapter-registry does not always use a custom index-adapter #65
Comments
I may be completely wrong here or misunderstanding the problem so please correct me if I am. And I'm writing this at 4am from my iPhone in Thailand so haven't been able to test my thoughts. But anyway... The adapter registry first goes through this.project.addons to find any adapter you have installed in your ember-cli project. This will not (and this is where my understanding may be incorrect) find the default adapter that has been installed via the package.json in ember-cli-deploy. If no adapter is found then it will require the default one installed by ember-cli-deploy. That was the intention anyway. Please let me know where/if this logic is incorrect. Thanks for your input mate. |
This is based on my understanding that this.project.addons contains the ember-addon packages installed directly in the ember-cli app and not those installed in it's dependencies. Ie, the default adapter installed in node_modules inside ember-cli-deploy |
Unfortunately, I believe your assumption is incorrect. From my testing, |
Ok mate. I'll have a play with it too over the next couple of days. Thanks for bringing this up. |
|
Re: comments on https://github.com/achambers/ember-cli-deploy/pull/47
When installing a custom index-adapter, the adapter-registry will only use the first index-adapter it finds. Depending on the order of dependencies inside an app's package.json, the first index-adapter may be the default
ember-cli-deploy-redis-index-adapter
.This makes it difficult to install a custom index-adapter named
ember-cli-deploy-***
, since npm will usually save dependencies in alphabetical order.Suggested Solutions
ember-cli-deploy-redis-index-adapter
if another index-adapter existsember-cli-deploy-redis-index-adapter
from theember-cli-deploy
dependenciesI can create a PR once we decide upon the best solution.
Work around
Move the custom
index-adapter
above theember-cli-deploy
package in your ember-cli app's package.json.The text was updated successfully, but these errors were encountered: