A compile error positioning method, device, server and readable storage medium

By obtaining and analyzing build task log information, we can accurately locate and correct compilation errors, which solves the problem of errors being unable to be located during the continuous build process and improves the efficiency of build tasks.

CN111309506BActive Publication Date: 2024-09-20CHINA PING AN LIFE INSURANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010089507.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-02-12
Publication Date
2024-09-20
Estimated Expiration
2040-02-12

AI Technical Summary

Technical Problem

During the continuous build process, compilation errors cannot be effectively located, causing development and testing progress to be blocked, and the developer who caused the error cannot be accurately notified.

Method used

By obtaining the log information during the construction task, it detects compilation errors, determines the error type information, queries the error file path information, and sends the log information to the relevant user terminal so that the user can correct the error.

Benefits of technology

It achieves precise positioning and correction of compilation errors, improves the efficiency of construction tasks, and avoids unnecessary notification interference.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111309506B
    Figure CN111309506B
Patent Text Reader

Abstract

The embodiment of the present invention discloses a method, device, server and readable storage medium for locating a compilation error, wherein the method comprises: obtaining log information recording a compilation process in the process of executing a construction task; when a compilation error occurs in the log information, stopping the current construction task, and determining the class information where the compilation error occurs according to the log information; determining the error file where the class information is located according to the class information where the compilation error occurs, and querying the path information of the error file in the construction task; determining the modification record information of the error file according to the path information, and sending the log information to a user terminal corresponding to the modification record information, so that the user terminal determines the location where the compilation error occurs according to the log information, and modifies the compilation error. Through this implementation method, the location where the compilation error occurs can be effectively located, and the compilation error in the construction task process can be modified in time to improve the efficiency of the construction task.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of compile error positioning, and in particular to a compile error positioning method, device, server and readable storage medium. Background Art

[0002] Currently, in the solution of continuously building applications, when a compilation error occurs, the developer can generally be notified immediately. If an email service is added to the computer for continuous building, the developer can also receive a notification of the build failure, but the specific cause cannot be located. If the development team has multiple colleagues, when the email notification is sent, everyone can receive the notification, and the developer who caused the compilation error cannot be notified separately. This method may result in the inability to locate editing error information during the continuous building process, blocking the development and testing progress. Therefore, how to more effectively locate error information in the editing process has become an urgent problem to be solved. Summary of the invention

[0003] The embodiments of the present invention provide a method, device, server and readable storage medium for locating a compilation error, which can effectively locate the location where the compilation error occurs and timely modify the compilation error in the process of building a task to improve the efficiency of the building task.

[0004] In a first aspect, an embodiment of the present invention provides a method for locating a compilation error, comprising:

[0005] Get the log information that records the compilation process during the execution of the build task;

[0006] When a compilation error occurs in the log information, the current construction task is stopped, and class information where the compilation error occurs is determined based on the log information;

[0007] Determine the error file where the class information is located according to the class information where the compilation error occurs, and query the path information of the error file in the build task;

[0008] Determine modification record information of the error file according to the path information, and send the log information to a user terminal corresponding to the modification record information, so that the user terminal determines the location where the compilation error occurs according to the log information and modifies the compilation error.

[0009] Further, the determining the class information where the compilation error occurs according to the log information includes:

[0010] Obtain each line of information in the specified range in the log information;

[0011] Matching each line of information within the specified range according to a preset matching rule to determine the line of information where a compilation error occurs;

[0012] According to a preset correspondence between the row information and the class information, the class information corresponding to the row information where the compilation error occurs is determined.

[0013] Further, the determining the error file where the class information is located according to the class information where the compilation error occurs, and querying the path information of the error file in the build task, includes:

[0014] Determine the name of the error file where the class information is located according to the class information where the compilation error occurs;

[0015] According to the name of the error file, path information of the error file in the build task is obtained by querying through a specified query command.

[0016] Further, determining the modification record information of the error file according to the path information includes:

[0017] According to the path information, using a specified query tool to query content information of an error file corresponding to the path information;

[0018] Determine the modification record information containing the modification mark from the content information of the error file.

[0019] Further, the modification record information includes the modification content and the corresponding terminal identifier for the modification; and sending the log information to the user terminal corresponding to the modification record information includes:

[0020] Obtaining the modification content and the corresponding terminal identifier included in the modification record information;

[0021] According to the correspondence between the preset content information and the line information in the log information, determining the target line information corresponding to the modified content from the log information;

[0022] The target row information in the log information is sent to the user terminal corresponding to the terminal identifier for the modification.

[0023] Further, the sending of the target row information in the log information to the user terminal corresponding to the terminal identifier for the modification includes:

[0024] Generate notification information according to the target row information in the log information;

[0025] The target email address corresponding to the terminal identifier to be modified is determined according to the preset correspondence between the terminal identifier and the email address, and the notification information is sent to the target email address to notify the user terminal of the target email address to correct the compilation error.

[0026] Furthermore, before sending the notification information to the target email address, the method further includes:

[0027] Encrypting the notification information using the terminal identifier as a public key according to a preset encryption algorithm to obtain encrypted notification information;

[0028] The sending the notification information to the target email address includes:

[0029] The encrypted notification information is sent to the target email address to notify the user terminal of the target email address to correct the compilation error.

[0030] In a second aspect, an embodiment of the present invention provides a positioning device, which includes a unit for executing the compile error positioning method of the first aspect.

[0031] In a third aspect, an embodiment of the present invention provides a server, comprising a processor, an input device, an output device and a memory, wherein the processor, input device, output device and memory are interconnected, wherein the memory is used to store a computer program that supports a compilation error positioning device to execute the above method, the computer program includes a program, and the processor is configured to call the program to execute the method of the above first aspect.

[0032] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the method of the first aspect.

[0033] The embodiment of the present invention can obtain log information recording the compilation process in the process of executing a construction task. When a compilation error is detected in the log information, the current construction task is stopped, and the class information where the compilation error occurs is determined according to the log information; the error file where the class information is located is determined according to the class information where the compilation error occurs, and the path information of the error file in the construction task is queried; the modification record information of the error file is determined according to the path information, and the log information is sent to the user terminal corresponding to the modification record information, so that the user terminal determines the location where the compilation error occurs according to the log information, and modifies the compilation error. Through this implementation method, the user terminal that causes the compilation error can be effectively determined, the location where the compilation error occurs can be located, and the compilation error in the construction task process can be modified in time to improve the efficiency of the construction task. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying any creative work.

[0035] Figure 1 is a schematic flow chart of a method for locating a compilation error provided by an embodiment of the present invention;

[0036] Figure 2 is a schematic flow chart of another method for locating a compilation error provided by an embodiment of the present invention;

[0037] Figure 3 is a schematic block diagram of a positioning device provided by an embodiment of the present invention;

[0038] Figure 4 It is a schematic block diagram of a server provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0039] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0040] The method for locating a compilation error provided by an embodiment of the present invention may be executed by a positioning device, wherein the positioning device may be set on a server. In some embodiments, the positioning device may be installed on a server; in some embodiments, the positioning device may be spatially independent of the server; in some embodiments, the positioning device may be a component of the server, that is, the server includes the positioning device.

[0041] In an embodiment of the present invention, if the positioning device detects a compilation error in the log information generated by the compilation process during the continuous construction task, it can control the construction platform to stop the current construction task, start reading the log information, and determine the location where the compilation error occurred based on the log information.

[0042] In one embodiment, when reading log information, the positioning device can read the last several lines of information of the log information, such as the last 100 lines of information, and determine the class information such as class that causes the compilation error through a preset matching rule, and locate the error file name where the class information is located. In one embodiment, the positioning device can query and obtain the path information of the error file in the continuous construction task through a common terminal command such as the find command, and view the modification records and modification developers of the error file within a preset time range such as the last 10 times through a specified tool such as the git tool, so as to send the last several lines of the log information generated in the compilation process such as the last 100 lines (including the cause of the compilation error) to the user terminal corresponding to the developer who modified within the preset time range such as the last 10 times in the form of an email notification, so that the corresponding developer receives the email notification, can obtain the cause of the compilation error from the email as soon as possible, and then correct the error in time and submit the corrected code to the server.

[0043] This solution sends the log information of the compilation error to the user terminal corresponding to the modification record information, so that the user terminal determines the location of the compilation error according to the log information and modifies the compilation error, thereby effectively locating the location of the compilation error and improving the efficiency of the construction task. The following is a schematic description of the compilation error locating method of the embodiment of the present invention in conjunction with the accompanying drawings.

[0044] See also Figure 1 , Figure 1 is a schematic flow chart of a method for locating a compilation error provided by an embodiment of the present invention, such as Figure 1 As shown, the method can be executed by a positioning device, and the specific explanation of the positioning device is as described above, which will not be repeated here. Specifically, the method of the embodiment of the present invention includes the following steps.

[0045] S101: Obtain log information recording the compilation process during the execution of the build task.

[0046] In the embodiment of the present invention, the positioning device can obtain log information recording the compilation process during the execution of the construction task.

[0047] S102: When it is detected that a compilation error occurs in the log information, the current construction task is stopped, and class information in which the compilation error occurs is determined according to the log information.

[0048] In the embodiment of the present invention, when it is detected that a compilation error occurs in the log information, the positioning device may stop the current construction task and determine the class information in which the compilation error occurs according to the log information.

[0049] In one embodiment, when a compilation error is detected in the log information, the positioning device can stop the current construction task, obtain each line of information in the log information within a specified range, and determine the line information where the compilation error occurs through a preset matching rule, thereby determining the class information corresponding to the line information where the compilation error occurs. In some embodiments, the specified range may refer to the range of the number of lines in the log information, which is not specifically limited in the embodiments of the present invention.

[0050] For example, assuming that the specified range is the last 100 lines of information, when a compilation error is detected in the log information, the positioning device can stop the current build task and obtain the last 100 lines of information in the log information. If the last 10 lines of information in which the compilation error occurs are determined from the last 100 lines of information through a preset matching rule, the class information corresponding to the last 10 lines of information in which the compilation error occurs can be determined.

[0051] Through this implementation, class information of a compilation error may be determined, thereby facilitating determination of a file in which a compilation error occurs according to its type.

[0052] S103: Determine the error file where the class information is located according to the class information where the compilation error occurs, and query the path information of the error file in the construction task.

[0053] In the embodiment of the present invention, the positioning device can determine the error file where the class information is located according to the class information where the compilation error occurs, and query the path information of the error file in the construction task.

[0054] In one embodiment, when the positioning device determines the error file where the class information is located based on the class information where the compilation error occurs, and queries the path information of the error file in the construction task, it can determine the name of the error file where the class information is located based on the class information where the compilation error occurs, and obtain the path information of the error file in the construction task through a specified query command based on the name of the error file.

[0055] For example, assuming that the positioning device determines that the name of the error file where the class information of the compilation error occurs is research, if the specified query command is the find command, the positioning device can determine that the name of the error file is research, and obtain the path information of the error file in the construction task through the specified query command find query according to the name of the error file: D:\dxl\research.

[0056] S104: Determine modification record information of the error file according to the path information, and send the log information to a user terminal corresponding to the modification record information, so that the user terminal determines the location where the compilation error occurs according to the log information and modifies the compilation error.

[0057] In an embodiment of the present invention, the positioning device can determine the modification record information of the error file according to the path information, and send the log information to the user terminal corresponding to the modification record information, so that the user terminal determines the location where the compilation error occurs according to the log information and modifies the compilation error.

[0058] In one embodiment, when the positioning device determines the modification record information of the error file based on the path information, it can use a specified query tool to query the content information of the error file corresponding to the path information based on the path information, and determine the modification record information with the modification identifier from the content information of the error file.

[0059] For example, assuming that the designated query tool is gitlab, if the positioning device queries and obtains the path information of the error file in the build task as: D:\dxl\research, the positioning device can use the designated query tool gitlab to query the content information of the error file research corresponding to the path information D:\dxl\research based on the path information D:\dxl\research, and determine the modification record information with the modification identifier from the content information of the error file research.

[0060] In one embodiment, the modification record information includes the modification content and the corresponding terminal identification for the modification; when the positioning device sends the log information to the user terminal corresponding to the modification record information, the modification content and the corresponding terminal identification for the modification included in the modification record information can be obtained, and according to the correspondence between the preset content information and the row information in the log information, the target row information corresponding to the modification content is determined from the log information, thereby sending the target row information in the log information to the user terminal corresponding to the terminal identification for the modification.

[0061] For example, assuming that the terminal identification of the modified device included in the modification record information is 1, the positioning device can obtain the modification content and the corresponding terminal identification 1 included in the modification record information, and according to the correspondence between the preset content information and the line information in the log information, determine from the log information that the target line information corresponding to the modification content is the last 5 lines of information, and send the last 5 lines of information in the log information to the user terminal corresponding to the terminal identification 1 that is performing the modification.

[0062] It can be seen that, through this implementation, it is possible to avoid sending log information to irrelevant user terminals when a compilation error occurs, thereby avoiding affecting irrelevant user terminals.

[0063] In one embodiment, before sending the target row information in the log information to the user terminal corresponding to the terminal identifier to be modified, the positioning device may encrypt the target row information according to a preset encryption algorithm, and send the encrypted target row information to the user terminal corresponding to the terminal identifier to be modified. It can be seen that by encrypting the target row information, the target row information can be prevented from being illegally tampered with, thereby improving the security of the target row information.

[0064] In one embodiment, when the positioning device sends the target line information in the log information to the user terminal corresponding to the terminal identifier to be modified, it can generate notification information based on the target line information in the log information, and determine the target email address corresponding to the terminal identifier to be modified based on the preset correspondence between the terminal identifier and the email address, and send the notification information to the target email address to notify the user terminal of the target email address to correct the compilation error.

[0065] For example, assuming that the target line information is the last 5 lines of information in the log information, the positioning device can generate notification information based on the last 5 lines of information in the log information, and determine the target email address corresponding to the terminal identifier 1 to be modified based on the preset correspondence between the terminal identifier and the email address, and send the notification information to the target email address to notify the user terminal 1 of the target email address to correct the compilation error.

[0066] In one embodiment, before the positioning device sends the notification information to the target email address, it can encrypt the notification information according to a preset encryption algorithm using the terminal identifier as a public key to obtain the encrypted notification information, and send the encrypted notification information to the target email address to notify the user terminal of the target email address to correct the compilation error.

[0067] In an embodiment of the present invention, the positioning device can obtain log information recording the compilation process in the process of executing the construction task. When a compilation error is detected in the log information, the current construction task is stopped, and the class information where the compilation error occurs is determined according to the log information; the error file where the class information is located is determined according to the class information where the compilation error occurs, and the path information of the error file in the construction task is queried; the modification record information of the error file is determined according to the path information, and the log information is sent to the user terminal corresponding to the modification record information, so that the user terminal determines the location where the compilation error occurs according to the log information, and modifies the compilation error. Through this implementation, the user terminal that causes the compilation error can be effectively determined, the location where the compilation error occurs can be located, and the compilation error in the construction task process can be modified in time to improve the efficiency of the construction task.

[0068] See also Figure 2 , Figure 2 is a schematic flow chart of another method for locating a compilation error provided by an embodiment of the present invention, such as Figure 2 As shown, the method can be executed by a positioning device, and the specific explanation of the positioning device is as described above and will not be repeated here. Figure 1 The difference between the above embodiments is that the embodiment of the present invention schematically illustrates the detailed implementation process of the method for locating a compilation error. Specifically, the method of the embodiment of the present invention includes the following steps.

[0069] S201: Obtain log information recording the compilation process during the execution of the build task.

[0070] In the embodiment of the present invention, the positioning device can obtain log information recording the compilation process during the execution of the construction task.

[0071] S202: When a compilation error is detected in the log information, the current construction task is stopped, and each line of information in the log information within a specified range is obtained.

[0072] In an embodiment of the present invention, when a compilation error is detected in the log information, the current build task is stopped, and each line of information in the log information within a specified range is obtained. In some embodiments, the specified range may refer to the range of lines in the log information, which is not specifically limited in the embodiment of the present invention.

[0073] For example, assuming that the specified range is the last 100 lines of information, when a compilation error is detected in the log information, the positioning device may stop the current build task and obtain the last 100 lines of information in the log information.

[0074] S203: Match each line of information within the specified range according to a preset matching rule to determine the line of information where a compilation error occurs.

[0075] In the embodiment of the present invention, the positioning device may match each line of information within the specified range according to a preset matching rule to determine the line of information where a compilation error occurs.

[0076] For example, the positioning device may determine the last 10 lines of information where compilation errors occur from the last 100 lines of information according to a preset matching rule.

[0077] S204: Determine the class information corresponding to the line information where the compilation error occurs according to a preset correspondence relationship between the line information and the class information.

[0078] In the embodiment of the present invention, the positioning device may determine the class information corresponding to the line information where the compilation error occurs according to a preset correspondence relationship between the line information and the class information.

[0079] S205: Determine the error file where the class information is located according to the class information where the compilation error occurs, and query the path information of the error file in the construction task.

[0080] In the embodiment of the present invention, the positioning device can determine the error file where the class information is located according to the class information where the compilation error occurs, and query the path information of the error file in the construction task.

[0081] S206: Determine modification record information of the error file according to the path information, and send the log information to a user terminal corresponding to the modification record information, so that the user terminal determines the location where the compilation error occurs according to the log information and modifies the compilation error.

[0082] In an embodiment of the present invention, the positioning device can determine the modification record information of the error file according to the path information, and send the log information to the user terminal corresponding to the modification record information, so that the user terminal determines the location where the compilation error occurs according to the log information and modifies the compilation error.

[0083] In an embodiment of the present invention, when a compile error occurs in the log information, the positioning device can stop the current construction task, obtain each line of information in the specified range in the log information, and match each line of information in the specified range according to a preset matching rule to determine the line information where the compilation error occurs. The positioning device can determine the class information corresponding to the line information where the compilation error occurs according to the preset correspondence between the line information and the class information, determine the error file where the class information is located according to the class information where the compilation error occurs, and query the path information of the error file in the construction task. The positioning device can determine the modification record information of the error file according to the path information, and send the log information to the user terminal corresponding to the modification record information, so that the user terminal determines the location where the compilation error occurs according to the log information, and modifies the compilation error. Through this implementation, the user terminal that causes the compilation error can be effectively determined, the location where the compilation error occurs can be located, and the compilation error in the construction task process can be modified in time to improve the efficiency of the construction task.

[0084] The embodiment of the present invention further provides a positioning device, which is used to execute a unit of any of the above methods. Figure 3 , Figure 3 It is a schematic block diagram of a positioning device provided by an embodiment of the present invention. The positioning device according to the embodiment of the present invention includes: an acquisition unit 301, a determination unit 302, a query unit 303, and a sending unit 304.

[0085] The acquisition unit 301 is used to acquire log information recording the compilation process during the execution of the build task;

[0086] The determination unit 302 is used to stop the current construction task when a compilation error occurs in the log information, and determine the class information where the compilation error occurs according to the log information;

[0087] A query unit 303 is used to determine the error file where the class information is located according to the class information where the compilation error occurs, and query the path information of the error file in the build task;

[0088] The sending unit 304 is used to determine the modification record information of the error file according to the path information, and send the log information to the user terminal corresponding to the modification record information, so that the user terminal determines the location where the compilation error occurs according to the log information and modifies the compilation error.

[0089] Further, when the determining unit 302 determines the class information where the compilation error occurs according to the log information, it is specifically used to:

[0090] Obtain each line of information in the specified range in the log information;

[0091] Matching each line of information within the specified range according to a preset matching rule to determine the line of information where a compilation error occurs;

[0092] According to a preset correspondence between the row information and the class information, the class information corresponding to the row information where the compilation error occurs is determined.

[0093] Further, the query unit 303 determines the error file where the class information is located according to the class information where the compilation error occurs, and queries the path information of the error file in the build task, specifically for:

[0094] Determine the name of the error file where the class information is located according to the class information where the compilation error occurs;

[0095] According to the name of the error file, path information of the error file in the build task is obtained by querying through a specified query command.

[0096] Further, when the sending unit 304 determines the modification record information of the error file according to the path information, it is specifically used to:

[0097] According to the path information, using a specified query tool to query content information of an error file corresponding to the path information;

[0098] Determine the modification record information containing the modification mark from the content information of the error file.

[0099] Further, the modification record information includes the modification content and the corresponding terminal identifier for the modification; when the sending unit 304 sends the log information to the user terminal corresponding to the modification record information, it is specifically used to:

[0100] Obtaining the modification content and the corresponding terminal identifier included in the modification record information;

[0101] According to the correspondence between the preset content information and the line information in the log information, determining the target line information corresponding to the modified content from the log information;

[0102] The target row information in the log information is sent to the user terminal corresponding to the terminal identifier for the modification.

[0103] Further, when the sending unit 304 sends the target row information in the log information to the user terminal corresponding to the terminal identifier to be modified, it is specifically used to:

[0104] Generate notification information according to the target row information in the log information;

[0105] The target email address corresponding to the terminal identifier to be modified is determined according to the preset correspondence between the terminal identifier and the email address, and the notification information is sent to the target email address to notify the user terminal of the target email address to correct the compilation error.

[0106] Furthermore, before sending the notification information to the target email address, the sending unit 304 is further configured to:

[0107] Encrypting the notification information using the terminal identifier as a public key according to a preset encryption algorithm to obtain encrypted notification information;

[0108] When the sending unit 304 sends the notification information to the target email address, it is specifically used to:

[0109] The encrypted notification information is sent to the target email address to notify the user terminal of the target email address to correct the compilation error.

[0110] In an embodiment of the present invention, the positioning device can obtain log information recording the compilation process in the process of executing the construction task. When a compilation error is detected in the log information, the current construction task is stopped, and the class information where the compilation error occurs is determined according to the log information; the error file where the class information is located is determined according to the class information where the compilation error occurs, and the path information of the error file in the construction task is queried; the modification record information of the error file is determined according to the path information, and the log information is sent to the user terminal corresponding to the modification record information, so that the user terminal determines the location where the compilation error occurs according to the log information, and modifies the compilation error. Through this implementation, the user terminal that causes the compilation error can be effectively determined, the location where the compilation error occurs can be located, and the compilation error in the construction task process can be modified in time to improve the efficiency of the construction task.

[0111] See also Figure 4 , Figure 4 4 is a schematic block diagram of a server provided by an embodiment of the present invention. As shown in the figure, the server in this embodiment may include: one or more processors 401; one or more input devices 402, one or more output devices 403 and a memory 404. The above-mentioned processors 401, input devices 402, output devices 403 and memory 404 are connected via a bus 405. The memory 404 is used to store computer programs, and the computer programs include programs. The processor 401 is used to execute the programs stored in the memory 404. Among them, the processor 401 is configured to call the program to execute:

[0112] Get the log information that records the compilation process during the execution of the build task;

[0113] When a compilation error occurs in the log information, the current construction task is stopped, and class information where the compilation error occurs is determined based on the log information;

[0114] Determine the error file where the class information is located according to the class information where the compilation error occurs, and query the path information of the error file in the build task;

[0115] Determine modification record information of the error file according to the path information, and send the log information to a user terminal corresponding to the modification record information, so that the user terminal determines the location where the compilation error occurs according to the log information and modifies the compilation error.

[0116] Further, when the processor 401 determines the class information where the compilation error occurs according to the log information, it is specifically used to:

[0117] Obtain each line of information in the specified range in the log information;

[0118] Matching each line of information within the specified range according to a preset matching rule to determine the line of information where a compilation error occurs;

[0119] According to a preset correspondence between the row information and the class information, the class information corresponding to the row information where the compilation error occurs is determined.

[0120] Further, the processor 401 determines the error file where the class information is located according to the class information where the compilation error occurs, and queries the path information of the error file in the build task, specifically for:

[0121] Determine the name of the error file where the class information is located according to the class information where the compilation error occurs;

[0122] According to the name of the error file, path information of the error file in the build task is obtained by querying through a specified query command.

[0123] Further, when the processor 401 determines the modification record information of the error file according to the path information, it is specifically used to:

[0124] According to the path information, using a specified query tool to query content information of an error file corresponding to the path information;

[0125] Determine the modification record information containing the modification mark from the content information of the error file.

[0126] Further, the modification record information includes the modification content and the corresponding terminal identifier for the modification; when the processor 401 sends the log information to the user terminal corresponding to the modification record information, it is specifically used to:

[0127] Obtaining the modification content and the corresponding terminal identifier included in the modification record information;

[0128] According to the correspondence between the preset content information and the line information in the log information, determining the target line information corresponding to the modified content from the log information;

[0129] The target row information in the log information is sent to the user terminal corresponding to the terminal identifier for the modification.

[0130] Further, when the processor 401 sends the target row information in the log information to the user terminal corresponding to the terminal identifier to be modified, it is specifically configured to:

[0131] Generate notification information according to the target row information in the log information;

[0132] The target email address corresponding to the terminal identifier to be modified is determined according to the preset correspondence between the terminal identifier and the email address, and the notification information is sent to the target email address to notify the user terminal of the target email address to correct the compilation error.

[0133] Furthermore, before sending the notification information to the target email address, the processor 401 is further configured to:

[0134] Encrypting the notification information using the terminal identifier as a public key according to a preset encryption algorithm to obtain encrypted notification information;

[0135] When the processor 401 sends the notification information to the target email address, it is specifically used to:

[0136] The encrypted notification information is sent to the target email address to notify the user terminal of the target email address to correct the compilation error.

[0137] In an embodiment of the present invention, the positioning device can obtain log information recording the compilation process in the process of executing the construction task. When a compilation error is detected in the log information, the current construction task is stopped, and the class information where the compilation error occurs is determined according to the log information; the error file where the class information is located is determined according to the class information where the compilation error occurs, and the path information of the error file in the construction task is queried; the modification record information of the error file is determined according to the path information, and the log information is sent to the user terminal corresponding to the modification record information, so that the user terminal determines the location where the compilation error occurs according to the log information, and modifies the compilation error. Through this implementation, the user terminal that causes the compilation error can be effectively determined, the location where the compilation error occurs can be located, and the compilation error in the construction task process can be modified in time to improve the efficiency of the construction task.

[0138] It should be understood that in the embodiment of the present invention, the processor 401 may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0139] The input device 402 may include a touch pad, a microphone, etc., and the output device 403 may include a display (LCD, etc.), a speaker, etc.

[0140] The memory 404 may include a read-only memory and a random access memory, and provide instructions and data to the processor 401. A portion of the memory 404 may also include a non-volatile random access memory. For example, the memory 404 may also store information about the device type.

[0141] In a specific implementation, the processor 401, the input device 402, and the output device 403 described in the embodiment of the present invention can execute the method for locating a compilation error provided by the embodiment of the present invention. Figure 1 or Figure 2 The implementation described in the method embodiment can also implement the embodiment of the present invention. Figure 3 The implementation of the described positioning device will not be described in detail here.

[0142] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, Figure 1 or Figure 2 The compile error location method described in the corresponding embodiment can also implement the present invention. Figure 3 The positioning device of the corresponding embodiment will not be described in detail here.

[0143] The computer-readable storage medium may be an internal storage unit of the positioning device described in any of the aforementioned embodiments, such as a hard disk or memory of the positioning device. The computer-readable storage medium may also be an external storage device of the positioning device, such as a plug-in hard disk equipped on the positioning device, a smart memory card (SmarS Media Card, SMC), a secure digital (Secure DigiSal, SD) card, a flash card (Flash Card), etc. Further, the computer-readable storage medium may also include both an internal storage unit of the positioning device and an external storage device. The computer-readable storage medium is used to store the computer program and other programs and data required by the positioning device. The computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.

[0144] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a computer-readable storage medium, including a number of instructions for a computer device (which can be a personal computer, terminal, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned computer-readable storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0145] The above descriptions are only partial implementation modes of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or substitutions within the technical scope disclosed by the present invention, and these modifications or substitutions should be included in the protection scope of the present invention.

Claims

1. A method for locating a compilation error, characterized in that: include: Get the log information that records the compilation process during the execution of the build task; When a compilation error occurs in the log information, the current construction task is stopped, and class information where the compilation error occurs is determined based on the log information; Determine the error file where the class information is located according to the class information where the compilation error occurs, and query the path information of the error file in the build task; Determining modification record information of the error file according to the path information, and sending the log information to a user terminal corresponding to the modification record information, so that the user terminal determines the location where the compilation error occurs according to the log information, and modifies the compilation error; The step of determining the error file where the class information is located according to the class information where the compilation error occurs, and querying the path information of the error file in the construction task includes: Determine the name of the error file where the class information is located according to the class information where the compilation error occurs; According to the name of the error file, obtain the path information of the error file in the build task through a specified query command; The determining the modification record information of the error file according to the path information includes: According to the path information, using a specified query tool to query content information of an error file corresponding to the path information; Determine modification record information containing a modification mark from the content information of the error file; The modification record information includes the modification content and the terminal identifier corresponding to the modification; and sending the log information to the user terminal corresponding to the modification record information includes: Obtaining the modification content and the corresponding terminal identifier included in the modification record information; According to the correspondence between the preset content information and the line information in the log information, determining the target line information corresponding to the modified content from the log information; Sending the target row information in the log information to the user terminal corresponding to the terminal identifier to be modified; The sending the target row information in the log information to the user terminal corresponding to the terminal identifier to be modified includes: Generate notification information according to the target row information in the log information; Determine a target email address corresponding to the terminal identifier to be modified according to a preset correspondence between the terminal identifier and the email address, and send the notification information to the target email address to notify the user terminal of the target email address to correct the compilation error; Before sending the notification information to the target email address, the method further includes: Encrypting the notification information using the terminal identifier as a public key according to a preset encryption algorithm to obtain encrypted notification information; The sending the notification information to the target email address includes: The encrypted notification information is sent to the target email address to notify the user terminal of the target email address to correct the compilation error.

2. The method according to claim 1, characterized in that The determining, according to the log information, the class information where the compilation error occurs, includes: Obtain each line of information in the specified range in the log information; Matching each line of information within the specified range according to a preset matching rule to determine the line of information where a compilation error occurs; According to a preset correspondence between the row information and the class information, the class information corresponding to the row information where the compilation error occurs is determined.

3. A positioning device, characterized in that: The method comprises means for performing the method as claimed in claim 1 or 2.

4. A server, characterized in that: The method comprises a processor, an input device, an output device and a memory, wherein the processor, the input device, the output device and the memory are interconnected, wherein the memory is used to store a computer program, the computer program comprises a program, and the processor is configured to call the program to execute the method as claimed in claim 1 or 2.

5. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the method of claim 1 or 2.