CN107729017B - Compiling method, device and equipment - Google Patents

Compiling method, device and equipment Download PDF

Info

Publication number
CN107729017B
CN107729017B CN201710947458.1A CN201710947458A CN107729017B CN 107729017 B CN107729017 B CN 107729017B CN 201710947458 A CN201710947458 A CN 201710947458A CN 107729017 B CN107729017 B CN 107729017B
Authority
CN
China
Prior art keywords
item
compiling
updated
items
compilable
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710947458.1A
Other languages
Chinese (zh)
Other versions
CN107729017A (en
Inventor
梁彦刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yuanxin Information Technology Group Co ltd
Original Assignee
Beijing Yuanxin Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Yuanxin Science and Technology Co Ltd filed Critical Beijing Yuanxin Science and Technology Co Ltd
Priority to CN201710947458.1A priority Critical patent/CN107729017B/en
Publication of CN107729017A publication Critical patent/CN107729017A/en
Application granted granted Critical
Publication of CN107729017B publication Critical patent/CN107729017B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/43Checking; Contextual analysis
    • G06F8/433Dependency analysis; Data or control flow analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Abstract

The embodiment of the invention provides a compiling method, a compiling device and equipment, wherein the method comprises the following steps: when an update item is received, judging whether a cyclic dependency exists in a dependency relation related to the update item; when the judgment result shows that the loop dependency exists, compiling is executed from the updated item, and at least one non-updated item related to the loop dependency is set as not-compilable; and after the compiling is detected to stop, setting at least one non-updating item which is not compilable as compilable, and setting the updating item as not compilable, so that the compiling is continuously executed. In the embodiment of the invention, the updating item and at least one non-updating item related to the loop dependency relationship are reasonably switched between the compiling possible state and the non-compiling state, the loop dependency relationship is divided into the two-stage non-loop dependency relationship, and the corresponding two-stage item compiling is respectively carried out, so that the compiling of the loop-dependent item can be realized under the condition of preventing from falling into the loop compiling.

Description

Compiling method, device and equipment
Technical Field
The invention relates to the technical field of compiling, in particular to a compiling method, a compiling device and compiling equipment.
Background
Software developers typically develop compiled software based on an Open, complete software release development platform, such as an OBS (Open Build Service) platform. The software release development platform provides an infrastructure to create software release packages that support a wide range of operating system and hardware architectures, while also supporting plug-ins (add-ons), application images (application images), or release packages for entire Linux.
Some software release development platforms support dependent compilation, that is, if a project is updated, all projects that depend on the project are recompiled except for the project. Relying on compilation functionality provides powerful support for the overall updating of a project.
However, if the dependent compilation of the software release development platform generates loop dependency, dead loop of project compilation in the software release development platform is caused, so that the project compilation based on the software release development platform fails.
The inventor of the invention finds that on one hand, a maintainer supporting a software release development platform relying on compilation usually only cares about the operation and maintenance of the software release development platform and does not perform the maintenance of removing the loop dependence on the compilation dependence; on the other hand, developers usually do not care whether the dependency relationship of the project on the software release development platform has circular dependency or not; often times compilation failures of the entire project occur due to loop dependencies.
At present, a software release development platform supporting the dependent compilation has no effective solution to the defect of loop triggering compilation.
Disclosure of Invention
The invention provides a compiling method, a compiling device and compiling equipment aiming at the defects of the existing mode and aims to solve the problem that a software release development platform is easy to generate circular compiling in the prior art.
According to a first aspect, an embodiment of the present invention provides a compiling method, including:
when an update item is received, judging whether a cyclic dependency exists in a dependency relation related to the update item;
when the judgment result shows that the loop dependency exists, compiling is executed from the updated item, and at least one non-updated item related to the loop dependency is set to be not compilable;
and after the compiling is detected to stop, setting at least one non-updating item which is not compiled as a compiling item, and setting the updating item as a non-compiling item, so that the compiling is continuously executed.
An embodiment of the present invention further provides, according to the second aspect, a compiling apparatus including:
the cyclic dependency judging module is used for judging whether cyclic dependency exists in the dependency relationship related to the updating item when the updating item is received; when the judgment result shows that the loop dependence exists, sending a state switching compiling notification;
the state switching and compiling module is used for starting to execute compiling from the updating item after receiving the state switching compiling notification and setting at least one non-updating item related to the circular dependence as non-compilable; and after the compiling is detected to stop, setting at least one non-updating item which is not compiled as a compiling item, and setting the updating item as a non-compiling item, so that the compiling is continuously executed.
An embodiment of the present invention further provides, according to a third aspect, a compiling apparatus including:
a memory;
a processor;
at least one program, stored in the memory, configured to implement the following steps when executed by the processor:
when an update item is received, judging whether a cyclic dependency exists in a dependency relation related to the update item;
when the judgment result shows that the loop dependency exists, compiling is executed from the updated item, and at least one non-updated item related to the loop dependency is set to be not compilable;
and after the compiling is detected to stop, setting at least one non-updating item which is not compiled as a compiling item, and setting the updating item as a non-compiling item, so that the compiling is continuously executed.
In the embodiment of the invention, when judging that the dependency relationship related to the update item has loop dependency, setting at least one non-update item related to the loop dependency as non-compilable, and starting to execute compilation from the update item; and when the compiling is detected to stop, setting at least one non-updating item which is not compilable as compilable, and setting the updating item as not compilable, so that the compiling is executed. In the embodiment of the invention, the updating item and at least one non-updating item related to the loop dependency relationship are reasonably switched between the compiling state and the non-compiling state, the loop dependency relationship is split into the two-stage non-loop dependency relationship, the corresponding two-stage item compiling is respectively carried out according to the two-stage non-loop dependency relationship, and the compiling work of all items related to the loop dependency relationship is finally completed; therefore, the compiling work of the items related to the loop dependency relationship can be realized under the condition of preventing the loop compiling from being trapped.
Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.
Drawings
The foregoing and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
FIG. 1 is a diagram illustrating a specific example of a conventional loop dependency-based compilation;
FIG. 2 is a flowchart illustrating a compiling method according to an embodiment of the invention;
FIG. 3 is a diagram illustrating a specific example of compiling based on conversion of a cyclic dependency relationship into a non-cyclic dependency relationship according to an embodiment of the present invention;
FIG. 4 is a block diagram of an internal structure of a compiler apparatus according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a framework of an internal structure of a compiling apparatus according to an embodiment of the invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are illustrative only and should not be construed as limiting the invention.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. As used herein, the term "and/or" includes all or any element and all combinations of one or more of the associated listed items.
It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
As will be appreciated by those skilled in the art, a "terminal" as used herein includes both devices having a wireless signal receiver, which are devices having only a wireless signal receiver without transmit capability, and devices having receive and transmit hardware, which have devices having receive and transmit hardware capable of two-way communication over a two-way communication link. Such a device may include: a cellular or other communication device having a single line display or a multi-line display or a cellular or other communication device without a multi-line display; PCS (Personal Communications Service), which may combine voice, data processing, facsimile and/or data communication capabilities; a PDA (Personal Digital Assistant), which may include a radio frequency receiver, a pager, internet/intranet access, a web browser, a notepad, a calendar and/or a GPS (Global Positioning System) receiver; a conventional laptop and/or palmtop computer or other device having and/or including a radio frequency receiver. As used herein, a "terminal" or "terminal device" may be portable, transportable, installed in a vehicle (aeronautical, maritime, and/or land-based), or situated and/or configured to operate locally and/or in a distributed fashion at any other location(s) on earth and/or in space. As used herein, a "terminal Device" may also be a communication terminal, a web terminal, a music/video playing terminal, such as a PDA, an MID (Mobile Internet Device) and/or a Mobile phone with music/video playing function, or a smart tv, a set-top box, etc.
The inventor of the invention finds that the dependency relationship of the current software release and development platform such as OBS and the like on the compiling project is only a simple trigger relationship, and does not detect and process any loop dependency possibly generated by the trigger relationship.
For example, fig. 1 is a schematic diagram of a specific example of existing compilation based on a loop dependency relationship. The cyclic dependencies in fig. 1 include: the compilation of the item A depends on the item C, the compilation of the item C depends on the item B, and the compilation of the item B depends on the item A. According to the loop dependency relationship, when the item A is updated, the item A is compiled, and when the item A is compiled, the software release development platform automatically triggers the compiling of the item B. Similarly, when the project B is updated, the project B is compiled, the compilation of the project C is automatically triggered after the project B is compiled, and the compilation of the project A is triggered by the project C, so that the uninterrupted loop compilation among the projects A-C in the software release and development platform is caused.
The inventor of the present invention also finds that if the occurrence of loop dependency is avoided as much as possible by manually checking the dependency relationship of maintenance project compilation or manually checking the loop dependency of a developer by a maintainer of a software release development platform, a great extra workload is caused to the maintainer or the developer, which greatly increases the time cost. Moreover, even if a maintainer or a developer finds that the loop dependency exists, loop compilation based on the loop dependency cannot be avoided, which may result in that some projects on the software release and development platform cannot complete compilation or software rework in development.
The technical solution of the embodiments of the present invention is specifically described below with reference to the accompanying drawings.
The embodiment of the invention is suitable for software release development platforms, such as OBS (Open Build Service) platforms and the like.
In the embodiment of the invention, after the source code file of a certain project is updated and submitted to the software release development platform by developers, the update compiling process of the software release development platform is automatically triggered, the project compiled because the source code file is submitted is an update project, and the project compiled because of the dependency relationship instead of the source code file is a non-update project.
For example, item B in fig. 1 depends on item a, and when the source code file of item a is updated and submitted, the compilation of item a is triggered; item A is an updated item and item B is a non-updated item, and compiling of item B is not triggered while item A is being compiled.
An embodiment of the present invention provides a compiling method, a flowchart of which is shown in fig. 2, and includes the following steps:
s201: when an update item is received, judging whether a cyclic dependency exists in a dependency relation related to the update item; when the judgment result shows that the loop dependency exists, executing step S202; when the judgment result indicates that there is no loop dependency, step S204 is executed.
Preferably, after a submission request sent by a source code file of a certain project or a source code file for updating to the software release development platform is monitored, the request is intercepted, the project is used as an update project, and the update project is determined to be received.
Determining all items that depend on the updated item; judging whether an updated item exists in all the items; when the judgment result is that the updated items exist in all the items, the cyclic dependence is indicated; when the judgment result indicates that there is loop dependency, step S202 is executed. Of all items that depend on the update item, items other than the update item are non-update items.
Preferably, all projects that are dependent on the update project are determined from the software release development platform. For each item in all items depending on the updated item, judging whether the dependent item exists in each item; when judging that each item has a dependent item, judging whether the dependent item is an updated item; when it is determined that the dependent item is an update item, indicating that there is a loop dependency, i.e., the determination result indicates that there is a loop dependency, the subsequent step S202 is performed.
When the dependent item is judged not to be the update item, the judgment of the next item dependent on the update item is continued.
When it is determined that there is no dependent item in the item dependent on the update item, it is determined that the item is a non-update item, and determination is continued for the next item dependent on the update item.
When there is no dependent item for each item dependent on the update item, or when there is a dependent item but the dependent item is a non-update item, it is determined that there is no loop dependency based on the update item, that is, the determination result indicates that there is no loop dependency, the subsequent step S204 is performed.
S202: and performing compilation from the updated item, and setting at least one non-updated item involved in the loop dependence as non-compilable.
Preferably, the (updated) source code file of the update project is submitted to the software release development platform, so that the software release development platform performs compilation from the update project; and setting at least one non-updating item involved in the loop dependence in the software release development platform as non-compilable. Further, setting at least one non-updated item involved in the loop dependency as non-compilable, includes: for all items depending on the updated item, determining all items except the updated item as non-updated items; and setting at least one non-updating item in the determined non-updating items as non-compilable.
For example, fig. 3 is a schematic diagram of a specific example of compiling based on converting a cyclic dependency into a non-cyclic dependency according to an embodiment of the present invention. In fig. 3, the compilation of item a depends on item C, the compilation of item C depends on item B, and the compilation of item B depends on item a. When the source code file of the item B is updated, the item B is an updated item, and the items A and C are non-updated items. Updating the source code file for project B can automatically trigger compilation for project B, setting project A to disable (meaning not compilable).
In this case, the software release development platform compiles both the update project and the default compilable non-update project related to the loop dependency related to the update project; and not compiling at least one non-updated item set as not compilable that is involved in the loop dependency. For example, update item B in fig. 3 and item C having update item B as a dependent item are compiled.
It can be appreciated that since the compilation process takes much longer than the non-compilable setup steps, even if the compilation of the updated item starts first and the non-compilable setup of the at least one non-updated item starts later, the non-compilable setup of the at least one non-updated item may be made to end first and the compilation of the updated item may be made to end later. Compilation can be prevented from getting trapped in loop dependencies, so that compilation is performed based on non-loop dependencies.
Preferably, the (updated) source code file of the update project is submitted to the software release development platform, so that the software release development platform executes compilation from the update project; meanwhile, at least one non-updating project involved in the loop dependency in the software release development platform is set to be not compilable.
It can be understood that since the compiling process takes much longer than the non-compilable setting step, the compiling of the update item starts simultaneously with the non-compilable setting of the at least one non-update item, and it can be ensured that the non-compilable setting of the at least one non-update item ends first and the compiling of the update item ends later.
For example, item A may be set to disable (meaning not compilable) while updating the source code file for item B in FIG. 3 automatically triggers compilation for item B.
Further, after setting at least one non-updated item involved in the loop dependency as not compilable, compiling is performed from the updated item. The compiling can be further prevented from being trapped in cyclic dependence, and compiling based on the dependence of non-cyclic is guaranteed.
For example, after item A in FIG. 3 is set to disable (indicating not compilable), then the source code file for item B is updated to trigger compilation for item B.
S203: and after the compiling is detected to stop, setting at least one non-updating item which is not compilable as compilable, and setting the updating item as not compilable, so that the compiling is continuously executed.
According to the steps, the update project and the default related to the cyclic dependence of the update project are compiled non-update projects, and the software release development platform automatically compiles the non-update projects; when the non-update item which is set as non-compilable and is involved in the loop dependence involved in the update item is encountered, the compilation is stopped, and the non-update item which is set as non-compilable is not compiled.
In this step, after the compiling is detected to be stopped, at least one non-update item which is not compilable in the software release development platform is set to be compilable, and the update item is set to be not compilable, so that the compiling is continuously executed.
On one hand, when the software release development platform detects that at least one non-updated project which is not compilable originally (in the steps) is set to be compilable, compiling of the at least one non-updated project is automatically executed; on the other hand, when the software release development platform detects that the original (in the above steps) compilable update item is set as not compilable, the update item is not compiled; thereby completing the compilation of the at least one non-updated item.
For example, in fig. 3, the non-update item a related to the loop dependency related to the update item B is set from able (compilable) to disable (non-compilable), so that the software release development platform compiles the non-update item a without compiling the update item B.
At this point, the original cyclic dependency relationship is split into more than two acyclic dependency relationships by reasonably setting the compilable and/or non-compilable of the updated item and the at least one non-updated item, so that the original cyclic dependent item is compiled.
It will be appreciated that since the compilation process takes much longer than the non-compilable and compilable setup steps, even if the compilation of at least one non-updated item begins first and the non-compilable setup of the updated item begins (or begins simultaneously), the non-compilable setup of the updated item ends first and the compilation of at least one non-updated item ends later. Compilation can be prevented from getting trapped in loop dependencies, so that compilation is performed based on non-loop dependencies.
Preferably, after at least one non-updated item that is not compilable is set as compilable, the updated item is set as not compilable.
For example, after the update item B in fig. 3 is set from able (compilable) to disable (not compilable), the non-update item a is set from disable (not compilable) to able (compilable), which further ensures that the software release development platform compiles the non-update item a without compiling the update item B.
S204: normal compilation is performed.
As is clear from the above-described procedure, since there is no loop dependency in the dependencies relating to the update items, in this procedure, all items relating to the dependencies relating to the update items are compiled while keeping all items in a state in which they can be compiled.
Based on the foregoing compiling method, an embodiment of the present invention further provides a compiling apparatus, where a frame schematic diagram of an internal structure of the compiling apparatus is shown in fig. 4, and the compiling apparatus includes: a loop dependency judgment module 401 and a state switching and compiling module 402.
The cyclic dependency determining module 401 is configured to determine whether a cyclic dependency exists in a dependency relationship related to an update item when the update item is received; and when the judgment result shows that the loop dependency exists, sending a state switching compiling notification.
The state switching and compiling module 402 is configured to, after receiving the state switching compiling notification, start to perform compiling from the update item, and set at least one non-update item related to the loop dependency as non-compilable; and after the compiling is detected to stop, setting at least one non-updating item which is not compilable as compilable, and setting the updating item as not compilable, so that the compiling is continuously executed.
Preferably, the loop dependency judgment module 401 is specifically configured to determine all items that depend on the updated item; judging whether an updated item exists in all the items; and when the judgment result shows that the updated items exist in all the items, indicating that the loop dependency exists, and sending a state switching compiling notification.
Preferably, the loop dependency determining module 401 is specifically configured to determine, for each item that depends on the updated item, whether there is a dependent item in each item; when it is determined that there is a dependent item for each item, it is determined whether the dependent item is an update item.
Preferably, the state switching and compiling module 402 is specifically configured to perform compiling from the updated item after setting at least one non-updated item involved in the loop dependency as non-compilable.
Preferably, the state switching and compiling module 402 is specifically configured to, for all items dependent on the updated item, determine all items except the updated item as non-updated items; and setting at least one non-updating item in the determined non-updating items as non-compilable.
Preferably, the state switching and compiling module 402 is specifically configured to set at least one non-updated item that is not compilable as compilable, and then set the updated item as not compilable.
The specific implementation method of the functions of the loop dependency determining module 401 and the state switching and compiling module 402 may be the specific content of the flow steps shown in fig. 2, and is not described herein again.
Preferably, an embodiment of the present invention further provides a compiling apparatus, where a framework diagram of an internal structure of the compiling apparatus is shown in fig. 5, and the framework diagram includes: a memory 501 and a processor 502.
The memory 501 is electrically connected to the processor 502.
At least one program, stored in the memory 501, configured to implement the following steps when executed by the processor 502: when an update item is received, judging whether a cyclic dependency exists in a dependency relation related to the update item; when the judgment result shows that the loop dependency exists, compiling is executed from the updated item, and at least one non-updated item related to the loop dependency is set as not-compilable; and after the compiling is detected to stop, setting at least one non-updating item which is not compilable as compilable, and setting the updating item as not compilable, so that the compiling is continuously executed.
Preferably, at least one program, in the step of determining whether there is a loop dependency in the dependency relationship related to the update item, specifically implements the following steps: determining all items that depend on the updated item; and judging whether the updated items exist in all the items.
Preferably, in the step of determining whether an updated item exists in all the items, at least one program specifically implements the following steps: for each item dependent on the updated item, judging whether a dependent item exists in each item; when it is determined that there is a dependent item for each item, it is determined whether the dependent item is an update item.
Preferably, the at least one program, during the step of performing compilation starting from an updated item and setting at least one non-updated item involved in the loop dependency as non-compilable, implements the following steps: after at least one non-updated item involved in the loop dependency is set as non-compilable, compilation is performed from the updated item.
Preferably, the at least one program, in implementing the step of setting at least one non-updated item involved in the loop dependency as not compilable, implements the following steps: for all items depending on the updated item, determining all items except the updated item as non-updated items; and setting at least one non-updating item in the determined non-updating items as non-compilable.
Preferably, the at least one program, during the step of setting at least one non-updated item that is not compilable as compilable and setting the updated item as not compilable, implements the following steps: and after at least one non-updating item which is not compilable is set to be compilable, the updating item is set to be not compilable.
In the embodiment of the invention, when judging that the dependency relationship related to the update item has loop dependency, setting at least one non-update item related to the loop dependency as non-compilable, and starting to execute compilation from the update item; and when the compiling is detected to stop, setting at least one non-updating item which is not compilable as compilable, and setting the updating item as not compilable, so that the compiling is executed. In the embodiment of the invention, the updating item and at least one non-updating item related to the loop dependency relationship are reasonably switched between the compiling state and the non-compiling state, the loop dependency relationship is split into the two-stage non-loop dependency relationship, the corresponding two-stage item compiling is respectively carried out according to the two-stage non-loop dependency relationship, and the compiling work of all items related to the loop dependency relationship is finally completed; therefore, the compiling work of the items related to the loop dependency relationship can be realized under the condition of preventing the loop compiling from being trapped.
In addition, in the embodiment of the invention, the software release development platform of the compilation project does not need to be changed; that is to say, the embodiment of the invention is suitable for project compiling work of a great number of software release development platforms, and has the advantages of wide application range and low application cost.
Further, in the embodiment of the present invention, all items depending on the update item may be determined, and when it is determined that an update item exists in all the items, it indicates that a cyclic dependency exists. Therefore, in the embodiment of the invention, the items are judged in a traversing manner, so that the omission of item judgment is avoided, and the judgment is more reliable; moreover, the judgment method is simple and rapid, and the efficiency is high.
Those skilled in the art will appreciate that the present invention includes apparatus directed to performing one or more of the operations described in the present application. These devices may be specially designed and manufactured for the required purposes, or they may comprise known devices in general-purpose computers. These devices have stored therein computer programs that are selectively activated or reconfigured. Such a computer program may be stored in a device (e.g., computer) readable medium, including, but not limited to, any type of disk including floppy disks, hard disks, optical disks, CD-ROMs, and magnetic-optical disks, ROMs (Read-Only memories), RAMs (Random Access memories), EPROMs (Erasable Programmable Read-Only memories), EEPROMs (Electrically Erasable Programmable Read-Only memories), flash memories, magnetic cards, or optical cards, or any type of media suitable for storing electronic instructions, and each coupled to a bus. That is, a readable medium includes any medium that stores or transmits information in a form readable by a device (e.g., a computer).
It will be understood by those within the art that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by computer program instructions. Those skilled in the art will appreciate that the computer program instructions may be implemented by a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, implement the features specified in the block or blocks of the block diagrams and/or flowchart illustrations of the present disclosure.
Those of skill in the art will appreciate that various operations, methods, steps in the processes, acts, or solutions discussed in the present application may be alternated, modified, combined, or deleted. Further, various operations, methods, steps in the flows, which have been discussed in the present application, may be interchanged, modified, rearranged, decomposed, combined, or eliminated. Further, steps, measures, schemes in the various operations, methods, procedures disclosed in the prior art and the present invention can also be alternated, changed, rearranged, decomposed, combined, or deleted.
The foregoing is only a partial embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (10)

1. A compilation method, comprising:
when an update item is received, judging whether a cyclic dependency exists in a dependency relation related to the update item; the update item is an item compiled by submitting a source code file; determining all items that depend on the updated item; judging whether an updated item exists in all the items; when the judgment result is that the updated items exist in all the items, the cyclic dependence is indicated;
when the judgment result shows that the loop dependency exists, compiling is executed from the updated item, and at least one non-updated item related to the loop dependency is set to be not compilable; the non-updated items are items compiled not by submitting source code files but by dependencies;
and after the compiling is detected to stop, setting at least one non-updating item which is not compiled as a compiling item, and setting the updating item as a non-compiling item, so that the compiling is continuously executed.
2. The method according to claim 1, wherein the determining whether a cyclic dependency exists in the dependency relationship related to the updated item includes:
determining all items that depend on the updated item;
judging whether the updated project exists in all the projects; and
the judgment result shows that the cyclic dependence exists, and comprises the following steps:
and when the judgment result is that the updated item exists in all the items, indicating that the cyclic dependency exists.
3. The method of claim 2, wherein the determining whether the updated item exists in the all items comprises:
for each item dependent on the updated item, judging whether a dependent item exists in each item;
when judging that each item has a dependent item, judging whether the dependent item is the updating item.
4. The method according to claim 2, wherein the performing compilation starting from the updated item, and setting at least one non-updated item involved in the loop dependency as non-compilable comprises:
and after at least one non-updating item related to the loop dependency is set to be not compiled, compiling is carried out from the updating item.
5. The method according to claim 4, wherein the setting of the at least one non-updated item involved in the loop dependency as non-compilable comprises:
for all items which depend on the updated item, determining all the items except the updated item in all the items as non-updated items;
and setting at least one non-updating item in the determined non-updating items as non-compilable.
6. The method of claim 1, wherein setting the at least one non-updated item that is not compilable to compilable and setting the updated item to not compilable comprises:
and after the at least one non-updating item which is not compilable is set to be compilable, setting the updating item to be not compilable.
7. A compiling apparatus characterized by comprising:
the cyclic dependency judging module is used for judging whether cyclic dependency exists in the dependency relationship related to the updating item when the updating item is received; when the judgment result shows that the loop dependence exists, sending a state switching compiling notification; the update item is an item compiled by submitting a source code file; determining all items that depend on the updated item; judging whether an updated item exists in all the items; when the judgment result is that the updated items exist in all the items, the cyclic dependence is indicated;
the state switching and compiling module is used for starting to execute compiling from the updating item after receiving the state switching compiling notification and setting at least one non-updating item related to the circular dependence as non-compilable; after the compiling is detected to stop, setting at least one non-updating item which is not compiled as a compiling item, and setting the updating item as a non-compiling item so as to continue the compiling; the non-updated items are items that are compiled not by committing the source code file, but rather by dependencies.
8. The apparatus of claim 7,
the loop dependency judgment module is specifically configured to determine all items that depend on the update item; judging whether the updated project exists in all the projects; and when the judgment result shows that the updated item exists in all the items, indicating that the loop dependency exists, and sending the state switching compiling notification.
9. The apparatus of claim 8,
the loop dependency judgment module is specifically configured to judge, for each item that depends on the updated item, whether the item has a dependent item; and when judging that the item has a dependent item, judging whether the dependent item is the updating item.
10. A compiling device characterized by comprising:
a memory;
a processor;
at least one program, stored in the memory, configured to implement the following steps when executed by the processor:
when an update item is received, judging whether a cyclic dependency exists in a dependency relation related to the update item; determining all items that depend on the updated item; judging whether an updated item exists in all the items; when the judgment result is that the updated items exist in all the items, the cyclic dependence is indicated;
when the judgment result shows that the loop dependency exists, compiling is executed from the updated item, and at least one non-updated item related to the loop dependency is set to be not compilable;
and after the compiling is detected to stop, setting at least one non-updating item which is not compiled as a compiling item, and setting the updating item as a non-compiling item, so that the compiling is continuously executed.
CN201710947458.1A 2017-10-12 2017-10-12 Compiling method, device and equipment Active CN107729017B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710947458.1A CN107729017B (en) 2017-10-12 2017-10-12 Compiling method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710947458.1A CN107729017B (en) 2017-10-12 2017-10-12 Compiling method, device and equipment

Publications (2)

Publication Number Publication Date
CN107729017A CN107729017A (en) 2018-02-23
CN107729017B true CN107729017B (en) 2021-02-02

Family

ID=61210441

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710947458.1A Active CN107729017B (en) 2017-10-12 2017-10-12 Compiling method, device and equipment

Country Status (1)

Country Link
CN (1) CN107729017B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109491661B (en) * 2018-10-24 2022-06-24 武汉思普崚技术有限公司 Universal cross-compiling method and device
CN110764776A (en) * 2019-09-24 2020-02-07 中信百信银行股份有限公司 Dependent component management and control method and device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105760166A (en) * 2016-02-23 2016-07-13 浪潮通用软件有限公司 Source code automatic construction achieving method based on layering

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101639775B (en) * 2009-09-01 2012-05-02 用友软件股份有限公司 Constructing method of component and device
US9411558B2 (en) * 2012-10-20 2016-08-09 Luke Hutchison Systems and methods for parallelization of program code, interactive data visualization, and graphically-augmented code editing
CN104077140B (en) * 2014-07-04 2017-11-07 用友网络科技股份有限公司 Automation Compilation Method and compilation device for continuous integrating

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105760166A (en) * 2016-02-23 2016-07-13 浪潮通用软件有限公司 Source code automatic construction achieving method based on layering

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
解决Maven项目相互依赖/循环依赖/双向依赖的问题;字节码;《https://blog.csdn.net/u011450110/article/details/72818626》;20160526;第1-3页 *

Also Published As

Publication number Publication date
CN107729017A (en) 2018-02-23

Similar Documents

Publication Publication Date Title
US10635432B2 (en) Systems and methods for incremental software deployment
CN108399132B (en) Scheduling test method, device and storage medium
TWI258945B (en) Installing software on a mobile computing device using the rollback and security features of a configuration manager
CN107741851B (en) Compiling method and device of compiling system and terminal equipment
JPWO2009078285A1 (en) Wireless terminal, non-volatile memory of wireless terminal, and fail-safe storage method of diagnostic information
EP2864873B1 (en) Auto-update while running a client software application with update handshake between versions and runtime validation of the successor version
CN112416406B (en) Terminal equipment upgrading method, device, terminal equipment and medium
CN102693139A (en) Method and system for wirelessly upgrading mobile phone software
CN104834555A (en) Method for invoking functional module, related device and device repairing method
CN104918114A (en) Method and device for upgrading operation system
CN107729017B (en) Compiling method, device and equipment
US20110067007A1 (en) Automatic thread dumping
CN111316230B (en) Method and equipment for generating patch package
US8516506B2 (en) Method and system for restoring an application in a dynamically linked environment
CN110414218B (en) Kernel detection method and device, electronic equipment and storage medium
CN106708550B (en) Method and device for loading shared object library
US20190121985A1 (en) Detecting vulnerabilities in applications during execution
CN113032183A (en) System management method, device, computer equipment and storage medium
CN108536444B (en) Plug-in compiling method and device, computer equipment and storage medium
CN108959915B (en) Rootkit detection method, rootkit detection device and server
CN111949290B (en) Hot patch management method and device, electronic equipment and storage medium
CN112636986A (en) Gateway plug-in updating method and device
CN110659052A (en) Method and system for updating system software in network equipment and readable storage medium
KR100588199B1 (en) Method for recovering download mode in program download fail state of portable terminal, and portable terminal employing it
US11354138B1 (en) Optimizing plugin loading

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CB03 Change of inventor or designer information
CB03 Change of inventor or designer information

Inventor after: Zou Shihong

Inventor after: Huang Haodong

Inventor after: Liang Yangang

Inventor after: Xu Guoai

Inventor before: Liang Yangang

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20230516

Address after: Room 401, Floor 4, No. 2, Haidian East Third Street, Haidian District, Beijing 100080

Patentee after: Yuanxin Information Technology Group Co.,Ltd.

Address before: 100176 room 2222, building D, building 33, 99 Kechuang 14th Street, Beijing Economic and Technological Development Zone, Daxing District, Beijing

Patentee before: YUANXIN TECHNOLOGY