Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

About Overtrue's phonetic library overtrue/pinyin, why is travis error?

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

What is ThinkSNS?

ThinkSNS (TS for short), a platform-wide comprehensive social system, provides social software development and technical solutions for large, small and medium-sized enterprises and entrepreneurs at home and abroad.

1.png

This is the continuous integration status in the https://github.com/overtrue/pinyin home page README.

A friend asked me earlier, can I use error in this travis state? It must work. Let's take a look at what went wrong on travis:

2.png

It's already shown, and the unit tests that failed are php 5.5and php 5.6. let's just click on one to take a look at it.

3.png

No output was received over 10m, so travis thought there was a problem with the build. As a matter of fact, there is a problem, and I have been upset for a long time. The build that did not receive the output is tests/GeneratorFileDictLoaderTest.php, which tests the loader Overtrue\ Pinyin\ GeneratorFileDictLoader.

Explain the loader, because the phonetic library is based on the thesaurus, which is so large that it is not allowed to load so much data in memory in many scenarios. So the loader uses the Generator feature of php5.5+ to generate data at the cost of a large amount of disk IO and an increase of more than 90% of the allowable time. (as described in the PHP official documentation).

Travis believes that the reason for the build failure: this problem may be caused by the fake death caused by the file system of PHP 5.5-5.6 (see the PHP change log), coupled with the low IO ability of travis itself. So it faked death after causing the generator to open multiple file streams at the same time.

How to repair it

Well, I'm here to be funny. Do not know how to solve the problem of build failure, this problem I used to fork brother library this code, and did not find a good solution.

Maybe it would be good to delete this "generator" loader.

In fact, I specially posted this article to show Brother Chao how to make the construction run well.

Past R & D Diary Portal:

"ThinkSNS+ is based on the   Laravel master   branch [R & D Diary I]"

"webpack/Vue at the front end of ThinkSNS+ R & D [R & D Diary II]

"  ThinkSNS+ Component based on   Laravel Route   [R & D Diary 3]"

"how to configure   Laravel   can be configured at the backend of the website [R & D Diary 4]"

"how does ThinkSNS+   calculate the character display length [R & D Diary 5]"

"release of   ThinkSNS+ alpha.2   version based on   Laravel   [R & D Diary 6]"

"talk about the" automatic discovery "of Laravel 5.5and the mood at the moment [R & D Diary 7].

"following: one of my unique needs-0.5 English characters and 1 Chinese characters [R & D Diary 8]"

"using   Docker package Laradock server to deploy Laravel & ThinkSNS+ and other programs (multi-project) [R & D Diary 9]"

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report