-
-
Notifications
You must be signed in to change notification settings - Fork 114
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
Refactored packages into multiple packages #10
Conversation
This is work in progress. The issue is that it is really hard to test any of this now that it is outside of the Meteor repository and it is unclear how versions work. |
This does not really work. One issue is that But the whole point of this refactoring is to make so that I can reuse what is currently in @stubailo, @zol, so if we are testing collaboration here, here is the moment where some guidance from MDG would be useful, to see how to resolve this, so that I can continue working on the pull request. So what would be the solution for this. |
Thanks for your work on this Mitar. @martijnwalraven - I'd like to get your thoughts on this and Mitar's question on #5903 |
@mitar: I can't really help you with the specifics of what you're trying to do, because I don't know much about Blaze. But I would like to find a way for you to test the changes you're making and pave the way to including these in future Meteor releases. On meteor/meteor#5903, you ask when Blaze will be removed from the We're not sure yet what the best way is to do a release with split off packages. Depending on when we want to do the next release, it may make more sense to find a way to publish these packages on NPM, which is where we want all core packages to end up eventually. In the meantime, we could use symlinks for the release process or modify the @zol mentioned you are also interested in finding a way to publish Blaze as an NPM package. Do you have any idea yet how you would like to approach this? |
Hm, I think we have some parallel conversations here. No problem. Let me see if I can add anything useful to them.
Oh, OK. The issue is about build plugins. So the question is to split current package for compiling HTML files into multiple packages so that the rest of the code could be reused, while plugin could be replaced with a different one. Alternatively, there could be a way to change an existing plugin, or monkey-patching it (that would be enough for my particular situation), but from the prior discussion I think there is opposition to such idea:
So current approach is trying to split the package, but this approach is stuck because of current build system not supporting the idea that you add some HTML files in one package, and tell in another package how to compile those HTML files. (So where to put Personally, I would be for short and ugly solution would be access to build plugins. But I am willing to help make another approach, only it seems really hard. So I am asking for some guidance how to proceed with splitting those packages and making it work: body and dynamic template logic in one package, while plugin in another. This was the main thing I wanted to discuss in this pull request. The rest we can also discuss, but it is probably for some other place:
You should make sure you merge this fix for bad pull request merge first: meteor/meteor#6392 (not sure if the previous pull request is part of the RC 1.3 though, if it is just in
Symlinks have issues on Windows, no? Maybe git submodules? But the problem is that there are multiple packages in this repository. But the question is also how to test this repository on its own. This is the main idea behind decoupling packages. That they can also be independently tested.
That would be in general useful. That one could use forked core packages as well.
Oh, I do not have much experience with NPM. I mean, I do have some packages published, but I have been mostly inside Meteor ecosystem. What would be interesting is to see how to port build plugins to NPM. If this is possible, maybe then this pull request is unnecessary and we should first convert Blase to NPM, and during that process split plugin into another NPM package. But, that would also take a lot of time, I suspect. So what can we do in short term? |
Ok, let's focus on the pull request first and continue the conversation about working with split-off repositories somewhere else. As I mentioned, I'm not actually that familiar with Blaze internals, so bear with me while I try to understand what you're trying to accomplish. My first naive though is: wouldn't it be possible to always compile |
Hmm. You are maybe right. So we have high-level package Do you agree with this? |
Yes, that's what I had in mind. I'm glad you think that makes sense! |
Fun fact: |
I moved things around and added a plugin as a dependency, but all is theoretical because I am unable to run tests. |
Yes! It is running tests. |
But I'm seeing an error because |
Running again. But it does not look like anything is happening. :-( |
I don't think |
But then then you will get the |
Refactored packages into multiple packages.
Interesting. This broke things in a way that our CirlceCI testing did not fail because tests failed to even load. The issue is that there is code around which does Package.onUse(function (api) {
api.imply('templating-compiler');
api.imply('templating-runtime');
}); Does not seem to be completely backwards compatible in this regard. Any trick here to do? |
Fixed with: f2e61cd |
Yes, I think that's the right fix. |
But I would say that this is something |
I dunno - I think in NPM/ |
Followup of: meteor/meteor#5903