Original link: https://blog.othree.net/log/2023/09/11/vim-license-2/
Continuation of the previous article .
The question raised by Mike on the SPDX License List is why Vim needs to be replaced, but Vim Maintainer does not want to replace such a special situation, so I will explain it seriously and explain that this is a detail that has been confirmed with the original author Bram. Attached is the discussion and the most extreme example I mentioned before. And I guess the most important thing is whether anyone has used it like this in the real world. Fortunately, I have actually found a few projects that have seriously implemented the terms and conditions. Vim was replaced (of course, even Vim Maintainer was replaced), such as Tagbar ; my PR was submitted on 2019/07/11, and then it went back and forth to 9/25. After the last response, no one responded to me. , then it was suddenly merged on October 19 (in fact, SPDX has regular meetings, and it should be discussed whether to merge this PR), and then waited until January 2020. I sent the PR to choosealicense and added vim.txt Went in and merged quite smoothly this time.
The upstream problem was solved, and back to the license detection problem, my original PR was not merged, but Mike came up with a more general solution, which is to dynamically adjust the allowable range of differences based on the replacement string in the clause text. Then on 2020/03/13, Licensee 9.13.1 was released as the first version of Licensee that supports Vim License. Next, in theory, I only need to wait for GitHub to update the Licensee version. I am not too worried about this. I have a feeling that GitHub is seriously updating these things. Then, fast forward to three months later, during this period, I actually occasionally went to GitHub to see if the Vim License was detected, thinking that if it finally Once completed, you can submit a manuscript. It took about three years to do this. Anyway, it was a bit long, so I pulled the latest version of Licensee to test it. The result shocked me, it couldn’t be detected. Out!
So I took the time to investigate the cause, and it turned out that 9.14 started to break on 2020/05/12. Mike modified part of the algorithm in 9.14. When comparing the two files, due to the replacement of strings, it was not possible. A complete comparison may be used, so when there is a replacement string, the length difference of the files will affect the similarity. There is a dynamic max_delta
. If the length difference after the replacement string is too large and exceeds max_delta
, it will be judged as different. files, this mechanism was removed in 9.14, and the impact of replacement strings was directly included in the similarity. However, the penalty for the length difference was too large, resulting in inaccurate judgment of the Vim project itself. After discovering the reason, I sent a PR to adjust the penalty parameters so that Vim could just pass the test. As a result, when I sent the PR, Mike had already discovered this problem and had already modified it. The PR was still under review, and the method of the PR was dynamic. The value of the file length difference is adjusted according to the number of replacement strings. In addition, the Vim License has also been added to the test, so this problem should not occur again in the future.
Then, I waited for this PR merge for three months, but fortunately, 9.14.1 was released immediately after the merge, and then it was back to waiting for GitHub updates. I kept waiting and waiting, and occasionally went to GitHub. Vim repo to confirm. At the beginning of 2021, I wrote to GitHub Support to ask which version they were using at the time. Support also carefully helped me confirm that it had not been updated. Then I waited like this until early 2022. One day When using GitHub’s search function, I suddenly discovered that you can use conditional settings to search for projects with specific licensing terms. Then I thought that I could try Vim License: license:vim
, and there were projects that met the conditions ! It blew my mind! It turns out that GitHub has detected the Vim License at some point, but the result of the Vim repo is still incorrect. After further research, I speculated that GitHub has a cache mechanism. After searching the file, I found that it mentioned that if there is a project The licensing terms were incorrectly marked. You can contact support, so I sent a support request. I received a response quickly this time. Then on 2022/01/12, it was confirmed that the Vim project on GitHub was correctly displayed as Vim License. It took nearly five years, and I even tweeted to celebrate that day.
The hole I dug for nearly five years was finally filled today, and I can finally submit a manuscript this year.
— othree (@othree) January 12, 2022
After that, I was finally ready to submit my manuscript, and then successfully submitted it to COSCUP in 2022. The title was ” Five years of open source contribution, the story of GitHub supporting Vim License ” ( video , slideshow ). I also suffered a lot in the process of preparing to share. Video game interference Resistance, the sharing process went quite smoothly. I am a little dissatisfied but it is still acceptable. The dissatisfaction is that I forgot to mention some points that I wanted to share at the beginning, but I have made up for it in this article.
In fact, during the early waiting period, I also opened a small project , Vim License Gen , to help people generate Vim License files for their own projects/software. The reason why I have this tool is because of the previous plain text files. , the width of each line is approximately within 80 characters, but the name of each project is different. If you directly replace it, it may break the layout, so this tool will maintain the layout, and secondly, it can correctly Only replace the parts that need to be replaced. Then this project is open source using Vim License and generates Vim License files by itself. Then I also list it as one of the three projects using Vim License (the other two are Vim and vim -pathogen), this is also an implementation of self-hosting.
The story does not end here. The goal after COSCUP shared it was to write down this article, but I kept putting it off. One of the main reasons was that in the past I had written the article first and then organized it, but this time due to the preparation time It’s not enough. I can’t finish the article before sharing it. Instead, I write it later. There is no pressure to rush the article. In addition, there are distracting things such as Tears of the Kingdom, so I have been putting it off indefinitely until 2023/ this year. 08/05 It was reported that Bram Moolenaar, the author of Vim, passed away due to illness on August 3rd.
After Bram passed away, in addition to commemorating the memory, everyone will also worry about who will maintain Vim in the future. Fortunately, there are two other members in the Vim GitHub organization. Among them, Christian Brabandt has taken over the role of host, and he is also my The author of vim-airline, who has been using it for a long time, quickly issued a PR and made some related changes, such as commemorating Bram in the doc, updating the maintainer information in the file, etc. However, one of the changes was changed to LICENSE FILE! The change is of course the highly coupled Vim Maintainer part:
The current maintainer is Bram Moolenaar [email protected] .
Change to
The current maintainers are listed here: https://ift.tt/atHPUQ0.
Then I was pinged and found out that the PR had been merged. Now I was very nervous. In fact, I was thinking about the Vim License issue. I just wanted to say that Bram had just passed away and I could raise it later. I thought about it a lot at that time. Ideally, this solution should be able to continue to support existing projects using the Vim License, and also allow the text in the license terms to be updated correctly. However, no matter which solution was available at the time, there was no guarantee that the best of both worlds would be achieved. The solution that was thought of at the time for:
- Option 1: Change the content of the terms and release a new version, which may be called Vim License 1.1. The disadvantage is that you may need to resubmit the new version of the terms to choosealicense, but it is almost impossible to meet the conditions of the 1,000 projects submitted. ;
- Option 2: Change the content of the terms, continue to use the same term name, and do not push the modification to choosealicense. The disadvantage is that Licensee may not recognize it. As a result, the Vim project itself cannot be recognized as using the Vim License;
- Option 3: Same as 2, but the modified parts such as SPDX License List and choosealicense should be pushed. The disadvantage is that the text of the old version of the license terms may no longer be recognized. Another question is whether Mike will accept such a change?
As far as the previous record was concerned, the similarity detected by the version at that time was only 98.45%. If this change continues, will it explode and become undetectable? So I quickly found a time to download the latest versions of Vim and Licnesee. I came down to test, and the result was still 98.45%. This result shocked me again. My intuition is that the algorithm of Licensee has been improved. After checking it, I found that it happened to be one of the Licensee 9.16.0 earlier this year. The modification is to provide a higher tolerance range for replacement strings, so the old version of Vim License will have a similarity of 99.12% when compared, which is just enough for the modified difference of the new version, and this result just overcomes the shortcomings of option three. So the next step should be to proceed in this direction. First submit the new version of the text to the SPDX License List, and then update the template in choosealicense.
The above is the main story so far. Finally, I would like to make a summary, that is, why do you want to share this in COSCUP in the first place? In fact, my original imaginary audience was new to open source. One of the things I want to share is that when it comes to contributing to open source projects, I completely follow my own pace and do not put any pressure on anyone. I have not pushed for any waiting process. Anyone, but the “five years” in the title may have the opposite effect. Rock suggested that I adjust the title when I submitted the article, but I really couldn’t think of any other good titles, so I didn’t change it. Later, on the same day, I My previous session was Max’s ” Open Source Software and Community – Experience Talk on Participating in International Communities ” ( video ), which mentioned this point. You can choose the way you are most comfortable to participate, don’t be afraid to participate; the second point I want to share The other things are about things I learned in this process, such as the judgment principles of Licensee, SPDX-related things, and the process of communicating with various groups. Many things I didn’t know before, such as I knew there was a SPDX License Indentifier, but I don’t know what SPDX is used for. Then they maintain the License List, and even the text of the license terms can have replacement strings, etc. I think these are quite interesting knowledge; the last point is to share this The whole process, the twists and turns in the middle, the twists and turns that connect the pits to the horizon, I find it very interesting.
The following is a list of the PRs, Issues and discussions I have opened along the way:
- choosealicense.com/issues/498original issue
- vim_dev: A Questions about Vim License and Bram Ask about the details of Vim License
- licensee/issues/385 raised the issue of Vim License detection
- license-list-XML/pull/901 helps add replacement strings to the Vim License in the SPDX License List
- vim/pull/5458 Help Vim add LICENSE file
- vim-pathogen/pull/210 Help vim-pathogen add LICENSE file
- choosealicense.com/pull/717The most important PR, add vim.txt to choosealicense
- licensee/pull/445 Modify the problem of the new version of Licensee
- vim-license/issues/2 Vim License Gen records the issues used for each link
Finally, let’s have a simple timeline:
- 2013/07/15 Choose a license released - 2016/09/21 Display/detect the license - 2017/03/26 Open issue to choosealicense - 2018/06/15 First issue closed - 2019/06/23 Discuss the License text with Bram - 2019/06/27 Issue about Vim License detection - 2019/07/11 SPDX PR - 2019/09/25 Last comment of the SPDX PR - 2019/10/19 SPDX PR merged - 2020/01/08 PR add License to Vim - 2020/01/18 PR add License to vim-pathogen - 2020/01/21 PR add vim.txt to choosealicense - 2020/03/13 Licensee 9.13.1 released, Vim added - 2020/05/12 Licensee 9.14 release, Vim detection failed - 2020/07/04 PR to fix detection issue - 2020/10/14 Issue fix merged v9.14.1 - 2021/02/05 Contact GitHub support 1st time - 2022/01/12 Contact GitHub support 2nd time, 確認上線- 2022/05/22 投稿、開始寫文章- 2022/07/29 COSCUP 2022 - 2023/08/03 Bram Passed away - 2023/08/13 Vim License file updated - 2023/09/04 再次開始寫文章- 2023/09/12 發表文章
This article is reproduced from: https://blog.othree.net/log/2023/09/11/vim-license-2/
This site is for inclusion only, and the copyright belongs to the original author.