Re: Tomcat's fork of Commons File Upload
On 15/09/2023 19:34, Mark Thomas wrote: I tend to agree with sticking with 1.x. However, it appears I was underestimating somewhat when I said Tomcat had a "few" commits that 1.x didn't have. I still think this is the way to go but there are ~3 years worth of commits to work through. Also, Tomcat has picked up some of the 2.x refactoring that will need to be reverted. It looks like this is going to take a while. Yuck. That wasn't fun. The current position is: - all branches are (roughly) aligned with the current FileUpload 1.x - some 2.x refactoring (mainly the extraction of the Exceptions and the FileItemIteratorImpl) remains in the Tomcat forks - Tomcat 10.1.x onwards has removed some additional unused code I think there is some refactoring that could be done in FileUpload 1.x without breaking binary compatibility that would closer align Tomcat and FileUpload 1.x. Given the previous changes in FileUpload we could probably back-port the additional code removal commits from 10.1.x to 9.0.x/8.5.x. We could probably also revert any remaining refactoring changes Tomcat has that 1.x doesn't after the above changes. I have a few checks I want to run, particularly around bug 65710, to make sure I haven't broken anything. Apart from any additional fixes those checks highlight, I don't plan on any further alignment work before the next release round. I'm not convinced further alignment work (along the lines of the three points above) is beneficial right now. I may revisit that decision later if maintaining the current level of alignment proves difficult. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Tomcat's fork of Commons File Upload
On 15/09/2023 18:55, Coty Sutherland wrote: On Fri, Sep 15, 2023 at 8:43 AM Rémy Maucherat wrote: On Fri, Sep 15, 2023 at 2:38 PM Mark Thomas wrote: Since we have little choice for Tomcat 8.5.x and 9.0.x, I will be aligning these branches with FileUpload 1.x first. I'm not a huge fan of pulling a large chunk of Commons IO or on making sufficient changes to our fork so we don't have to. I am therefore currently planning on aligning 10.1.x and 11.0.x with FileUpload 1.x as well. I do intend to see if there are changes from FileUpload 2.x that are worth cherry-picking into Tomcat (and FileUpload 1.x) if minimum Java versions permit. All that said, the Jakarta EE Migration tool already includes a package renamed copy of Commons IO (as well as Lang and Compress) so there might be something we co do there - maybe a new Commons forks JAR? Thoughts? +1 on staying with fileupload 1.x for all branches then, for the time being. 11 could move to 2.x eventually it seems. +1 I tend to agree with sticking with 1.x. However, it appears I was underestimating somewhat when I said Tomcat had a "few" commits that 1.x didn't have. I still think this is the way to go but there are ~3 years worth of commits to work through. Also, Tomcat has picked up some of the 2.x refactoring that will need to be reverted. It looks like this is going to take a while. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Tomcat's fork of Commons File Upload
On Fri, Sep 15, 2023 at 8:43 AM Rémy Maucherat wrote: > On Fri, Sep 15, 2023 at 2:38 PM Mark Thomas wrote: > > > > All, > > > > Since the introduction of multi-part upload support in Servlet 3 (Tomcat > > 7), Tomcat has used a package renamed fork of Commons FileUpload to > > provide that support. > > > > Recently, FileUpload has undergone some major refactoring for 2.x to > > modularise it to support different versions of the Servlet > > specification, primarily Java EE vs Jakarta EE. As part of that, the > > minimum Java version for 2.x is Java 11. > > > > The code Tomcat is currently based on is now the essentially 1.x branch. > > This was created from the 1.4 release so Tomcat currently has a few > > changes that were not applied to that branch. The minimum Java version > > for this branch is Java 6. > > > > I have spent the last couple of hours looking at updating Tomcat 11.0.x > > to the 2.x FileUpload code. It is doable, but we'll need to bring in > > most of Commons IO as well which is about another 500k. > > > > Given the minimum Java version requirements, Tomcat 8.5.x and 9.0.x will > > need to remain based on FileUpload 1.x. > > > > Tomcat 10.1.x and Tomcat 11.0.x could opt to remain based on FileUpload > > 1.x or switch to 2.x. > > > > We need to decide what to do. > > > > Since we have little choice for Tomcat 8.5.x and 9.0.x, I will be > > aligning these branches with FileUpload 1.x first. > > > > I'm not a huge fan of pulling a large chunk of Commons IO or on making > > sufficient changes to our fork so we don't have to. I am therefore > > currently planning on aligning 10.1.x and 11.0.x with FileUpload 1.x as > > well. > > > > I do intend to see if there are changes from FileUpload 2.x that are > > worth cherry-picking into Tomcat (and FileUpload 1.x) if minimum Java > > versions permit. > > > > All that said, the Jakarta EE Migration tool already includes a package > > renamed copy of Commons IO (as well as Lang and Compress) so there might > > be something we co do there - maybe a new Commons forks JAR? > > > > Thoughts? > > +1 on staying with fileupload 1.x for all branches then, for the time > being. 11 could move to 2.x eventually it seems. > +1
Re: Tomcat's fork of Commons File Upload
Mark, Rémy, On 9/15/23 08:43, Rémy Maucherat wrote: On Fri, Sep 15, 2023 at 2:38 PM Mark Thomas wrote: All, Since the introduction of multi-part upload support in Servlet 3 (Tomcat 7), Tomcat has used a package renamed fork of Commons FileUpload to provide that support. Recently, FileUpload has undergone some major refactoring for 2.x to modularise it to support different versions of the Servlet specification, primarily Java EE vs Jakarta EE. As part of that, the minimum Java version for 2.x is Java 11. The code Tomcat is currently based on is now the essentially 1.x branch. This was created from the 1.4 release so Tomcat currently has a few changes that were not applied to that branch. The minimum Java version for this branch is Java 6. I have spent the last couple of hours looking at updating Tomcat 11.0.x to the 2.x FileUpload code. It is doable, but we'll need to bring in most of Commons IO as well which is about another 500k. Given the minimum Java version requirements, Tomcat 8.5.x and 9.0.x will need to remain based on FileUpload 1.x. Tomcat 10.1.x and Tomcat 11.0.x could opt to remain based on FileUpload 1.x or switch to 2.x. We need to decide what to do. Since we have little choice for Tomcat 8.5.x and 9.0.x, I will be aligning these branches with FileUpload 1.x first. I'm not a huge fan of pulling a large chunk of Commons IO or on making sufficient changes to our fork so we don't have to. I am therefore currently planning on aligning 10.1.x and 11.0.x with FileUpload 1.x as well. I do intend to see if there are changes from FileUpload 2.x that are worth cherry-picking into Tomcat (and FileUpload 1.x) if minimum Java versions permit. All that said, the Jakarta EE Migration tool already includes a package renamed copy of Commons IO (as well as Lang and Compress) so there might be something we co do there - maybe a new Commons forks JAR? Thoughts? +1 on staying with fileupload 1.x for all branches then, for the time being. 11 could move to 2.x eventually it seems. +1 -chris - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Tomcat's fork of Commons File Upload
On Fri, Sep 15, 2023 at 2:38 PM Mark Thomas wrote: > > All, > > Since the introduction of multi-part upload support in Servlet 3 (Tomcat > 7), Tomcat has used a package renamed fork of Commons FileUpload to > provide that support. > > Recently, FileUpload has undergone some major refactoring for 2.x to > modularise it to support different versions of the Servlet > specification, primarily Java EE vs Jakarta EE. As part of that, the > minimum Java version for 2.x is Java 11. > > The code Tomcat is currently based on is now the essentially 1.x branch. > This was created from the 1.4 release so Tomcat currently has a few > changes that were not applied to that branch. The minimum Java version > for this branch is Java 6. > > I have spent the last couple of hours looking at updating Tomcat 11.0.x > to the 2.x FileUpload code. It is doable, but we'll need to bring in > most of Commons IO as well which is about another 500k. > > Given the minimum Java version requirements, Tomcat 8.5.x and 9.0.x will > need to remain based on FileUpload 1.x. > > Tomcat 10.1.x and Tomcat 11.0.x could opt to remain based on FileUpload > 1.x or switch to 2.x. > > We need to decide what to do. > > Since we have little choice for Tomcat 8.5.x and 9.0.x, I will be > aligning these branches with FileUpload 1.x first. > > I'm not a huge fan of pulling a large chunk of Commons IO or on making > sufficient changes to our fork so we don't have to. I am therefore > currently planning on aligning 10.1.x and 11.0.x with FileUpload 1.x as > well. > > I do intend to see if there are changes from FileUpload 2.x that are > worth cherry-picking into Tomcat (and FileUpload 1.x) if minimum Java > versions permit. > > All that said, the Jakarta EE Migration tool already includes a package > renamed copy of Commons IO (as well as Lang and Compress) so there might > be something we co do there - maybe a new Commons forks JAR? > > Thoughts? +1 on staying with fileupload 1.x for all branches then, for the time being. 11 could move to 2.x eventually it seems. Rémy > Mark > > PS I'm going to start with 8.5.x (and then 9.0.x) now as I don't think > we have much choice with those two. > > - > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org > - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Tomcat's fork of Commons File Upload
All, Since the introduction of multi-part upload support in Servlet 3 (Tomcat 7), Tomcat has used a package renamed fork of Commons FileUpload to provide that support. Recently, FileUpload has undergone some major refactoring for 2.x to modularise it to support different versions of the Servlet specification, primarily Java EE vs Jakarta EE. As part of that, the minimum Java version for 2.x is Java 11. The code Tomcat is currently based on is now the essentially 1.x branch. This was created from the 1.4 release so Tomcat currently has a few changes that were not applied to that branch. The minimum Java version for this branch is Java 6. I have spent the last couple of hours looking at updating Tomcat 11.0.x to the 2.x FileUpload code. It is doable, but we'll need to bring in most of Commons IO as well which is about another 500k. Given the minimum Java version requirements, Tomcat 8.5.x and 9.0.x will need to remain based on FileUpload 1.x. Tomcat 10.1.x and Tomcat 11.0.x could opt to remain based on FileUpload 1.x or switch to 2.x. We need to decide what to do. Since we have little choice for Tomcat 8.5.x and 9.0.x, I will be aligning these branches with FileUpload 1.x first. I'm not a huge fan of pulling a large chunk of Commons IO or on making sufficient changes to our fork so we don't have to. I am therefore currently planning on aligning 10.1.x and 11.0.x with FileUpload 1.x as well. I do intend to see if there are changes from FileUpload 2.x that are worth cherry-picking into Tomcat (and FileUpload 1.x) if minimum Java versions permit. All that said, the Jakarta EE Migration tool already includes a package renamed copy of Commons IO (as well as Lang and Compress) so there might be something we co do there - maybe a new Commons forks JAR? Thoughts? Mark PS I'm going to start with 8.5.x (and then 9.0.x) now as I don't think we have much choice with those two. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org