-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Release version 3.4.0 #1858
Comments
Great list, thanks @mbest. For ease of reference: The Travis-CI build from the #1360 branch, which has merged all the 3.4.0 changes. The debug build from #1360 out to be near-bitwise-identical, and here are the errors reported on that branch:
IE 10.0.0 (Windows 8 0.0.0) registerEventHandler should not use jQuery eventing with useOnlyNativeEvents option set to true FAILED Expected false to be true. Expected false to be true. IE 9.0.0 (Windows 7 0.0.0) registerEventHandler should not use jQuery eventing with useOnlyNativeEvents option set to true FAILED Expected false to be true. Expected false to be true. IE 11.0.0 (Windows 8.1 0.0.0) registerEventHandler should not use jQuery eventing with useOnlyNativeEvents option set to true FAILED Expected false to be true. Expected false to be true. IE 9.0.0 (Windows 7 0.0.0) Binding: TextInput Should update observable on input event (on supported browsers) or propertychange event (on old IE) FAILED Expected 123 to equal 'some user-entered value'. IE 11.0.0 (Windows 8.1 0.0.0) Binding: Hasfocus Should not unnecessarily focus or blur an element that is already focused/blurred FAILED Expected true to equal false.
|
@brianmhunt, That's a good start. I fixed the For these tests that fail when using jQuery,
it appears that jQuery doesn't parse these elements correctly (it tries to parse them as table elements). Knockout's parser handles these now (see #1773). Perhaps we shouldn't use jQuery for parsing anymore. Any thoughts? |
@mbest Great about the On the parsing of HTML fragments, my personal preference would be to stop deferring to jQuery for parsing. The difficulties of working around the failings of jQuery in this case strike me as harder than writing a clean parser that works correctly. I am not aware of any particular upside to the jQuery parser – are you, @mbest? The only risk I see is something we are not aware of that crops up because we're dropping support for jQuery HTML parsing but someone is using it in a live environment. |
Incidentally, I think |
Since the jQuery parsing problem happens only with elements containing a hyphen, a workaround could be to not use jQuery if the element name contains a hyphen. We could actually code this using a "feature detection" technique so that a working future version of jQuery can be used automatically. |
I decided to go ahead and implement the above "fix". I also fixed an issue with parsing |
Thanks @mbest – great stuff. I think that is the best option right now. I have merged 200f196 into #1360: the test results are ongoing, but so-far so good. |
Some prelim release notes: Enhancements#1715 - Add ko.onError handler that provides more consistent error/stack information for async operations and event handlers Fixes#1256 - Better handling when an item is added while a |
The list looks good, @rniemeyer. I fixed some more tests that were failing in old IE (967389d):
|
Great stuff. I think the list looks good too, @rniemeyer @mbest – great job cleaning up the IE tests. I noticed a couple IE test failures still linger:
|
Awesome, thanks @mbest. The only other one that came up:
But, mind you, IE7/8 might not've run. |
@brianmhunt I've run the tests in IE 10 and don't see any error, so I'm not sure why that error is showing up for you. I also don't see any errors in Firefox on my computer (using version 34). |
@mbest The Firefox errors occur in versions 10 – 23, so you'll have to download an old release or set up SauceLabs or Browserstack to test it. I don't have any more debugging info on the IE 10 fail, I'm afraid, other than it occurs. It seems unlikely, but perhaps there is a race condition that's only breached because the remote browser environment is slow. Just a stab in the dark, really. |
About this failure:
I get that failure intermittently when running the tests in most versions of IE. It tends to happen the first time the browser is opened, but not afterwards. Since it appears to be a test timing issue (not a production code defect), I'm not concerned about blocking the release on it. But it will continue to interfere with the quality of automated test results so we'll probably want to address it eventually. |
Thanks everyone (especially @mbest) for investigating and fixing the legacy browser issues! I've looked into it a bit further and found there were just a few remaining issues relating to HTML parsing. Please see the pull request #1866 for details. Once this stuff is sorted, I think the code is ready to ship. Obviously we still need to do the other things in the checklist at the top of this page (docs, etc.). Regarding #1360 (migrate to Gulp) - how close are we to merging that? Brian, you mentioned that the debug output is nearly byte-for-byte identical. Could you elaborate on whether the remaining differences might be consequential in any way? Since #1360 now uses Closure Compiler, I'm guessing that once the debug build is equivalent to Grunt's output, the release build will be equivalent to Grunt's too. Is that right? If so, I'd love to get this merged in ASAP. Ideally before 3.4.0 ships, but if not, then let's at least commit to it being the absolute next thing that goes in, and hold off anything else going to |
@SteveSanderson - I would agree that #1360 should be the next thing. |
@SteveSanderson The build from #1360 compares to master as follows After running both, in directories for their respective branches,
The following command illustrates the differences in the debug: root@ko-tmp:~# diff master/build/output/knockout-latest.debug.js
1360/build/output/knockout-latest.debug.js
6,8d5
<
< (function(){
< var DEBUG=true;
11a9
> /* const */var DEBUG = true;
48c46
< ko.version = "3.3.0";
---
> ko.version = "3.3.0-debug";
5836,5837c5834
< }());
< })();
---
> }()); The only semantic difference here is that the The compiled versions are identical, except for one extra newline in 1360 that I have not found yet. A note on releasing: While there is a release task, and it closely follows some related discussion on releasing, I have not tested this thoroughly or recently, so while it may work please take it only as a guideline for now or test it out before using. There will undoubtedly be other considerations, advancements, and refinements we can make to the build process, but there is nothing I can think of that should hold up merging #1360. Incidentally, the above is set up in a VM that I can share, if you send along a public ssh key. |
Incidentally, it may be worthwhile to rebase to clean up the commit log for #1360. |
I'd prefer not to merge #1360 right now and hold up the release. Instead let's look at merging it right after. Also I'd prefer to get the benefits without it being spread through 139 commits. Ideally, there should be just enough commits to aid understanding of the changes. |
I've come up with a possible fix for #1622 (attached to the issue). @SteveSanderson, you've put a lot of thought and work recently into the |
I've been thinking that after releasing the new version, the Knockout code should not be left with the actual |
@mbest - makes sense to me |
Are we planning to add Edge to our list of supported browsers? |
@mbest If going down the road of a stable version and a development version, it probably sense to maintain a The development branch would get the This might sound a bit like git-flow, but I think that git-flow would probably needlessly restrictive. I think it makes sense to support Edge. |
Great work!!! 💯 I'm keenly looking forward to the docs around deferred updates and to hear experiences from others. I know @mbest has articles on his blog from a while ago. I've just downloaded the RC and if I enable deferred updates, some parts of my site where I'd gone to great effort to batch updates myself now break (understandably - it's an RC and I'm using two 'deferred' bits in conflict with each other). In effect I get some very tight loops so IE gives "long running script" messages and Opera/Chrome eventually crash... I'd rather move to baked-in deferred updates instead of my custom batching but I need to better understand the corner cases, etc so I can gradually migrate. I'm happy to share my experiences (and perhaps finally start a blog!) but will wait for the docs before digging in too deep. My use case: I get some data coming in via SignalR which needs to update the screen. I can get a lot of small objects in succession, all of which end up in an array and possibly having many other parts of the screen waiting on their arrival. I'd rather wait a little bit and let quite a few through in one hit than update the array many times. In IE it can make the difference between a 10 second pause and a 10ms pause. Throttling, rate-limit, etc aren't quite appropriate since it's not just array-based work I'm doing and the observable chain is, for programming convenience and to be nicely reactive to server data changes, not always a simple A->B->C relationship. |
Thanks for the feedback, @IanYates. It's possible that you have recursive logic in your code that depends on synchronous behavior. A common example is using some sort of "updating" flag that prevents code from running in response to certain changes:
The deferred code will stop running and throw an error if it detects a high level of recursion, but perhaps the recursion in your application isn't detected by Knockout (or you didn't wait long enough). |
I'm really excited by this release and i want to migrate some large applications who need performance improvement.. For now, i just tried 3.4.0rc but i see multiple recursion errors like this :
If i understood well, all computed that have a synchronous behaviour, need to be changed to prevent recursion. What is the best way to migrate them ? Do i need to add flags everywhere ? Thank you for the work done 👍 and sorry for my poor english |
@mbest Yes indeed. But if i want to use deferred updates or get performance boost, how can i fix this problem ? Could you give me a simple example of how to properly handle computed recursion ? |
FYI: We ran our Selenium UI and Jasmine tests (which we have good coverage of our code and UI) and they all passed. I don't have any numbers on performance improvements (we don't have a good bench marking system in place), but we are excitedly awaiting the full release so we can upgrade. Thanks for all the good work! |
I update to version 3.4 and now I have a different render behavior. In version 3.3 the container was shown immediately before all the bindings in the container were finished. In version 3.4 the container is not visible until all bindings are finished. So sometimes the user wait 2-3 second and nothing happens. I use components for my bindings. |
@Eisenspalter That's interesting. With 3.3.0, the components each render in a separate |
@mbest It's is not easy to say how long it take, because I don't know when the binding is finished. The important thing for me and the user experience is, that 3.3 does not block. The user can interrupt each the process. Knockout 3.4 blocks. That is not a good idea in Javascript. The second benefit of non blocking binding is, that you can do parallel things, like css3 animation for showing and hiding containers. That is a very nice user experience and reduce the waiting time for the users. |
@mbest |
The 3.4 pre-release is not showing up in Bower. I'm guessing that it'd because the release is tagged as 3.4.0rc and Bower might be expecting 3.4.0-beta. |
@jrsearles it works like that:
|
Right, which is what i've done. But it's not easily available in the current tag. (ie, |
I've changed the tag name to |
@mbest the tag doesn't have dist folder. So it does't work with bower |
Good catch @melck. I've fixed it now. |
It's been about two weeks since the RC release, and we've fixed a couple of problems that were discovered: #1903 and #1905. Other reports:
I think we should wait a little bit to see if we get any more feedback on the first two issues to be sure we're describing the situation clearly. |
Thanks @mbest for keeping 3.4 moving forward! In light of the issues raised, I agree on waiting a little bit. |
Draft release notes for final 3.4.0 release (edit as needed). New features and bug fixes
The 3.4.0 RC release notes has the full list of issues and pull requests included in this release. The final release fixes two regression bugs found in the RC:
Possible compatibility issues
|
How about putting out an RC2 nuget package? |
I've released 3.4.0 now. @SteveSanderson can you update NuGet? |
Is there anything that needs to be updated for the d.ts in DefinitelyTyped/DefinitelyTyped#4288? |
Awesome, thanks @mbest |
Thanks for the hard work guys! |
Hi guys! What's new about NuGet release? |
Thanks for this new release. @mbest +1 !!! |
The 3.4.0 package is now published to NuGet. |
Steps to release:
The text was updated successfully, but these errors were encountered: