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

timodule: module not found and deployType != module.deployType #37

Closed
farfromrefug opened this issue Feb 23, 2013 · 12 comments
Closed

timodule: module not found and deployType != module.deployType #37

farfromrefug opened this issue Feb 23, 2013 · 12 comments

Comments

@farfromrefug
Copy link

I have modules in my app that are only used for certains deployType.
When deployType != module.deployType, we still get a "module not found" error

I fixed it by adding

if (module.deployType && module.deployType != deployType) return;

there

@cb1kenobi
Copy link
Contributor

I'll have to run some tests and see if something is broken. Thanks for letting me know! :)

@farfromrefug
Copy link
Author

Wow in fact i just found the source of the error. It s a regression from that commit
ccdac00
Look at the first removed line!

@cb1kenobi
Copy link
Contributor

While I wasn't able to reproduce the issue with the deploy type, I was able to find an issue with the platform attribute being handled incorrectly: #38. If you wouldn't mind, take a peek at the timodule.js from that PR and see if that fixes things for you. Cheers!

@farfromrefug
Copy link
Author

Sorry but the pull requestion doesnt fix it. I added a comment on the line which shouldn't have been removed
ccdac00#L0L153

@cb1kenobi
Copy link
Contributor

No deploy-type is the same thing as "all" deploy types, so if deploy-type is not set, then we must continue to check if the rest of the criteria.

Check out the code:

if (!module.deployType || module.deployType == deployType) {
    module.deployType || (module.deployType = deployType);
    // <snip>
}

If the deployType is not set, then we set it to the current deployType of the build.

I tried a couple things and can't seem to reproduce your issue. I need you to provide me with a test case that demonstrates the problem you are encountering.

@farfromrefug
Copy link
Author

You are right Chris i am not talking about the case of NO deployType, i am talking about the case of :

module.deployType && (module.deployType != deployType)

Which is the test i pointed to in L153.
In that case you want to ignore, because you specified a deployType for the module and this is not the current deployType.

Here is an example i have in my tiapp.xml

<module deploy-type="test" platform="iphone" version="1.0">akylas.testflight</module>

I use this because i only want the module in hadoc build. Especially i dont want it in development or production.
This made the build fail with the latest CLI and without the fix i am talking about here

@cb1kenobi
Copy link
Contributor

@farfromrefug OK, I think it's finally starting to set in. I definitely see a problem. Stay tuned!

@cb1kenobi
Copy link
Contributor

I spent a couple hours and totally fixed it. The fix has been reviewed, tested, and merged into master.

PR: #38

Thanks again for your help on getting this stuff straight!

@farfromrefug
Copy link
Author

Wow the multiple deployType thing is great.
Thanks a lot. Going to merge right away ;)

@farfromrefug
Copy link
Author

Chris: I still dont see your pull request. Right now it s quite annoying as everytime i build node.js updates the packages and i end with a non working version because of this bug :s
Do you know when it's gonne be released?

Thanks

@cb1kenobi
Copy link
Contributor

It's merged into master of both node-appc and the titanium sdk. It'll be available in 3.1.0 when it ships in a couple weeks or so.

@farfromrefug
Copy link
Author

I guess i'll have to wait ;)
Thanks for your answer

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