Split core.js into smaller chunks#785
Conversation
|
CI not working because of this: #782 (comment) |
There was a problem hiding this comment.
I wonder where this function is actually getting used - maybe move it to stacktrace.js?
There was a problem hiding this comment.
It's just being used in assert.js, would it make sense to put it inside that file?
|
I'm not sure why the build has failed. I have tried to fix the error in the test-on-node task, but can't seem to find where it comes from |
There was a problem hiding this comment.
If its used only in assert.js, yes, it should go there.
Also: Remove the space before the opening paren.
|
Try |
|
Done, thank you for the tip! Now the build is passing in my local repository while it is not in jquery's. I think this may be browserstack's fault |
|
Yeah, more BrowserStack timeouts. Haven't been able to track down the cause of those, so for now we have to just ignore them. I'll review the diff... |
There was a problem hiding this comment.
Not a specific rule, but as this is a support method, it should be placed in the end, or after the Assert declaration and prototype definition.
There was a problem hiding this comment.
Yeah, it feels right at the end of the file.
I put it there because it was at the top of the core.js file, and thought it was something you guys preferred to do.
|
I might have shaken things too much this time, specially with the Waiting to hear what you think of this. |
|
I have kept moving things out of core The content of the new |
|
The failed build is browserstack's fault again. What do you guys think of the current state of the PR? |
|
I have very limited bandwidth for PR reviews this week. I hope @leobalter can provide you with some feedback for now. |
There was a problem hiding this comment.
This went deep, and I don't believe it's better to make this split into many files.
There're some things I liked, like the errorString function going to the assert.js file.
Maybe a better approach, using smaller files:
src/core/module.js: it doesn't exist.src/core/test.js: may go tosrc/test.jssrc/core/control/*they can stay atcore.jssrc/core/loggingCallbacks/*=>src/core/logging.jswould be fine- can create a
src/utilities.jscontaining:src/core/utilities.jssrc/core/extend.jssrc/core/objectType.jssrc/core/urlParams.jssrc/core/defined.js
src/core/config.jsis fine
|
caught only code style issues, and I'm already running tests on a local updated branch and I'll also manually check browserstack. |
Passing! |
|
Ok, everything has been fixed! Is this ready for merge? |
|
I have changed the title of the PR because it seems to be ready. Any other thing I should do? |
|
Any thoughts? |
|
By now this needs a rebase to be able to merge it. Haven't yet looked into the individual conflicts. |
|
Sorry I have been afk because I had to study for my exams. Still any interest? |
|
Yes, sure. I'm actually you're back!
|
|
I think Leo meant "glad you're back". @BraulioVM do you need more input somewhere? Seems like for now we "just" need a rebase. |
|
I'm sorry it took me so long but I'm studying for my exams right now and couldn't look into this. I hope it's done now. Tell me if anything else is needed, but I cannot assure you whether I will be able to get any important work done as I'm still studying. |
|
Yes, I'm glad. My autocorrector is not because of multiple languages everyday.
|
|
We really need to land this as soon as possible. Going through my email notifications in chronological order this morning, I ended up merging #822 before looking at this, and that caused another merge conflict. Sorry about that. @BraulioVM could you do the rebase magic once more? I think we can manage to hold off on any other commits to master for a little while, until this is done. Hopefully you can squeeze this in between your study. |
|
Rebase magic done. CI is failing, but I think it is not my fault. Could you look into it? It looks like there is a bug in browserstack/cli.js |
|
@leobalter could you do another review of this? |
|
LGTM, |
This PR tries to close #782.
I make the pull request now so that anyone can see how I'm approaching the task and can tell me whether I'm doing something wrong. As it is work in progress, it may not pass the tests