WO2023245449A1 - Incremental compilation processing method and apparatus, and electronic device and storage medium - Google Patents

Incremental compilation processing method and apparatus, and electronic device and storage medium Download PDF

Info

Publication number
WO2023245449A1
WO2023245449A1 PCT/CN2022/100242 CN2022100242W WO2023245449A1 WO 2023245449 A1 WO2023245449 A1 WO 2023245449A1 CN 2022100242 W CN2022100242 W CN 2022100242W WO 2023245449 A1 WO2023245449 A1 WO 2023245449A1
Authority
WO
WIPO (PCT)
Prior art keywords
file
information
initial
module
compilation
Prior art date
Application number
PCT/CN2022/100242
Other languages
French (fr)
Chinese (zh)
Inventor
董俊杰
杨冬东
王健宇
Original Assignee
北京小米移动软件有限公司
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 北京小米移动软件有限公司 filed Critical 北京小米移动软件有限公司
Priority to CN202280004590.8A priority Critical patent/CN117616387A/en
Priority to PCT/CN2022/100242 priority patent/WO2023245449A1/en
Publication of WO2023245449A1 publication Critical patent/WO2023245449A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation

Definitions

  • the present disclosure relates to the field of computer technology, and in particular, to an incremental compilation processing method, device, electronic equipment and storage medium.
  • the present disclosure aims to solve one of the technical problems in the related art, at least to a certain extent.
  • the purpose of this disclosure is to propose an incremental compilation processing method, device, electronic equipment, storage medium and computer program product that can avoid incremental compilation encountering exceptions, effectively improve the security of incremental compilation, and avoid bringing in A large amount of compilation time cost effectively improves the development efficiency of system modules.
  • the incremental compilation processing method proposed by the embodiment of the first aspect of the present disclosure includes: obtaining initial compilation information, where the initial compilation information includes: initial file information; and obtaining dependent files that have a first dependency relationship with the initial file indicated by the initial file information. information; generate incremental compilation information based on the initial compilation information and dependent file information; and perform incremental compilation processing based on the incremental compilation information.
  • the initial compilation information also includes: file compilation type; wherein, before obtaining the dependent file information that has a first dependency relationship with the initial file to which the initial file information belongs, it also includes: according to the file compilation type and the initial file information , determine the initial file.
  • determining the initial file based on the file compilation type and initial file information includes: if the file compilation type is a deletion operation type, obtaining the file to be deleted indicated by the deletion operation type as the initial file according to the initial file information; If the file compilation type is a change operation type, the change information content supported by the change operation type is determined based on the initial file information, and the file to which the change information content belongs is used as the initial file.
  • obtaining dependent file information that has a first dependency relationship with the initial file indicated by the initial file information includes: obtaining inter-module dependency information corresponding to the initial file information, wherein the inter-module dependency information describes where the initial file belongs Dependencies between the first system module and other system modules; obtain shared configuration information corresponding to the initial file information, where the shared configuration information describes the configuration parameters shared between the initial file and other files; according to the inter-module dependency information and Share configuration information and obtain dependency file information.
  • obtaining dependency file information based on inter-module dependency information and shared configuration information includes: determining a second system module that has a second dependency relationship with the first system module based on the inter-module dependency information, wherein: The second system module includes: a first dependency file; according to the shared configuration information, determine a second dependency file with shared configuration parameters with the initial file; according to the first dependency file information of the first dependency file and the second dependency file of the second dependency file. 2.
  • Dependent file information forms dependent file information.
  • determining a second system module that has a second dependency relationship with the first system module based on the inter-module dependency information includes: determining a third system module that has a direct dependency relationship with the first system module based on the inter-module dependency information.
  • determining a second dependent file with shared configuration parameters with the initial file based on the shared configuration information includes: determining second dependent file information corresponding to the initial file information based on the shared configuration information; The second dependent file information determines the second dependent file.
  • determining the second dependent file based on the second dependent file information includes: using the dependent file to which the second dependent file information belongs as the second dependent file; using the dependent file in the system module to which the second dependent file information belongs. As the second dependent file; use the dependent file that has a third dependency relationship with the dependent file to which the second dependent file information belongs as the second dependent file.
  • incremental compilation processing is performed according to the incremental compilation information, including: compiling the initial file to which the initial file information belongs to obtain the initial compiled file; compiling the dependent file to which the dependent file information belongs to obtain the dependent compilation file; package the first system module to which the initial compiled file belongs to generate a module-level first file resource package; package the second system module to which the dependent compiled file belongs to generate a module-level second file resource package.
  • performing incremental compilation processing based on the incremental compilation information also includes: deleting historical compilation files corresponding to the initial files in the first system module; deleting historical compilation files corresponding to the dependent files in the second system module. .
  • performing incremental compilation processing according to the incremental compilation information also includes: building the target system according to the first file resource package, the second file resource package, and the third file resource package; wherein, the third file resource The package is the file resource package corresponding to the third system module, and the third system module has no dependency relationship with either the first system module or the second system module.
  • the incremental compilation processing method proposed in the first aspect of the present disclosure obtains initial compilation information, where the initial compilation information includes: initial file information, and obtains dependent file information that has a first dependency relationship with the initial file indicated by the initial file information. , generate incremental compilation information based on the initial compilation information and dependent file information, and perform incremental compilation processing based on the incremental compilation information, which can avoid incremental compilation encountering exceptions, effectively improve the security of incremental compilation, and avoid bringing in a large number of Compilation time cost, effectively improving the development efficiency of system modules.
  • the incremental compilation processing device proposed by the embodiment of the second aspect of the present disclosure includes: a first acquisition module, used to acquire initial compilation information, where the initial compilation information includes: initial file information; a second acquisition module, used to acquire and initialize The initial file indicated by the file information has dependent file information of the first dependency relationship; a generation module is used to generate incremental compilation information based on the initial compilation information and dependent file information; and a processing module is used to perform incremental compilation information based on the incremental compilation information. Compilation processing.
  • the initial compilation information also includes: file compilation type; wherein, it also includes: a determination module, configured to compile according to the file before obtaining the dependent file information that has a first dependency relationship with the initial file to which the initial file information belongs. Type and initial file information to determine the initial file.
  • the determination module is specifically configured to: if the file compilation type is a deletion operation type, obtain the file to be deleted indicated by the deletion operation type according to the initial file information as the initial file; if the file compilation type is a change operation type , then the change information content supported by the change operation type is determined based on the initial file information, and the file to which the change information content belongs is used as the initial file.
  • the second acquisition module includes: a first acquisition sub-module, used to acquire inter-module dependency information corresponding to the initial file information, wherein the inter-module dependency information describes the relationship between the first system module to which the initial file belongs and other Dependencies between system modules; the second acquisition sub-module is used to obtain the shared configuration information corresponding to the initial file information, where the shared configuration information describes the configuration parameters shared between the initial file and other files; the third acquisition sub-module Module is used to obtain dependency file information based on inter-module dependency information and shared configuration information.
  • the third acquisition sub-module is specifically configured to determine, based on inter-module dependency information, a second system module that has a second dependency relationship with the first system module, wherein the second system module includes: A dependent file; according to the shared configuration information, determine a second dependent file with shared configuration parameters with the initial file; form a dependency based on the first dependent file information of the first dependent file and the second dependent file information of the second dependent file File information.
  • the third acquisition sub-module is also used to: determine the second system module that has a direct dependency relationship with the first system module based on the inter-module dependency information; determine the second system module that has a direct dependency relationship with the first system module based on the inter-module dependency information.
  • the second system module has an indirect dependency relationship between the modules; where the direct dependency relationship indicates the direct dependence between the first system module and the first system module, and the indirect dependency relationship indicates that the first system module and the second system module pass through the third system Module indirect dependencies, direct dependencies and indirect dependencies are jointly regarded as secondary dependencies.
  • the third acquisition sub-module is further configured to: determine second dependent file information corresponding to the initial file information based on the shared configuration information; determine the second dependent file based on the second dependent file information.
  • the third acquisition sub-module is also configured to: use the dependent file to which the second dependent file information belongs as the second dependent file; use the dependent file in the system module to which the second dependent file information belongs as the second dependent file. ; Use the dependent file that has a third dependency relationship with the dependent file to which the second dependent file information belongs as the second dependent file.
  • the processing module is specifically configured to: compile the initial file to which the initial file information belongs to obtain an initial compiled file; compile and process the dependent file to which the dependent file information belongs to obtain a dependent compiled file; compile the initial compiled file
  • the first system module to which it belongs is packaged to generate a module-level first file resource package; the second system module to which the dependent compiled file belongs is packaged to generate a module-level second file resource package.
  • the processing module is also configured to: delete the historical compilation file corresponding to the initial file in the first system module; delete the historical compilation file corresponding to the dependent file in the second system module.
  • the processing module is also configured to: build the target system based on the first file resource package, the second file resource package, and the third file resource package; wherein the third file resource package is corresponding to the third system module file resource package, the third system module has no dependency on either the first system module or the second system module.
  • the incremental compilation processing device proposed by the embodiment of the second aspect of the present disclosure acquires the dependent file information that has a first dependency relationship with the initial file indicated by the initial file information by obtaining initial compilation information, where the initial compilation information includes: initial file information. , generate incremental compilation information based on the initial compilation information and dependent file information, and perform incremental compilation processing based on the incremental compilation information, which can avoid incremental compilation encountering exceptions, effectively improve the security of incremental compilation, and avoid bringing in a large number of Compilation time cost, effectively improving the development efficiency of system modules.
  • the third embodiment of the present disclosure provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor.
  • the processor executes the program, the implementation of the first embodiment of the present disclosure is implemented.
  • the proposed incremental compilation processing method is described in detail below.
  • the fourth embodiment of the present disclosure provides a non-transitory computer-readable storage medium on which a computer program is stored.
  • the program is executed by a processor, the incremental compilation processing method as proposed in the first embodiment of the present disclosure is implemented. .
  • the fifth embodiment of the present disclosure provides a computer program product.
  • instructions in the computer program product are executed by a processor, the incremental compilation processing method proposed in the first embodiment of the present disclosure is executed.
  • Figure 1 is a schematic flowchart of an incremental compilation processing method proposed by an embodiment of the present disclosure
  • Figure 2 is a schematic flowchart of an incremental compilation processing method proposed by another embodiment of the present disclosure.
  • Figure 3 is a schematic flowchart of an incremental compilation processing method proposed by another embodiment of the present disclosure.
  • Figure 4 is a schematic structural diagram of an incremental compilation processing device proposed by an embodiment of the present disclosure.
  • Figure 5 is a schematic structural diagram of an incremental compilation processing device proposed by another embodiment of the present disclosure.
  • FIG. 6 illustrates a block diagram of an exemplary electronic device suitable for implementing embodiments of the present disclosure.
  • FIG. 1 is a schematic flowchart of an incremental compilation processing method proposed by an embodiment of the present disclosure.
  • the execution subject of the incremental compilation processing method in this embodiment is an incremental compilation processing device.
  • This device can be implemented by software and/or hardware.
  • the device can be configured in an electronic device. This is not done. limit.
  • An electronic device is a device that sends data to or receives data from other devices via communication facilities. That is to say, the electronic device can be, for example, a terminal device, a computer device, etc. that are capable of network communication connections. This does not mean limit.
  • the incremental compilation processing method includes:
  • initial compilation information In some application scenarios, such as in the process of building a commercial-level product system, automated compilation and deployment tools will be provided for all components of each system, which are used to support the configuration of automated compilation of a certain component or module in the system. Related information such as interfaces and processing logic can be called initial compilation information. This initial compilation information can be used to support automated compilation of corresponding components or modules, and there is no limit to this.
  • the file can be, for example, a configuration file in a module or component in the system, a computer program code file, etc., and when it is determined that the system needs to be automatically compiled, based on The file information determined by the automated compilation requirements can be called initial file information.
  • the corresponding file name, file identification, file size, file type and other file information can be determined as the initial file information based on the automatic compilation requirements, and then the initial file information is Encapsulated into the initial compilation information to support the incremental compilation processing method in the embodiment of the present disclosure.
  • S102 Obtain dependent file information that has a first dependency relationship with the initial file indicated by the initial file information.
  • the initial file information can be parsed from the initial compilation information, and then, based on the initial file information, the information of other files required for compilation processing can be analyzed.
  • the files compiled based on the initial file information analysis requirements can be called dependent files. If the initial file information is used to describe the initial files that are changed or need to be deleted, then the corresponding dependent files can be There are no restrictions on files that are considered to have dependencies on the initial file, or files that share configuration parameters with the initial file.
  • the dependency relationship between the initial file and the dependent file can be called the first dependency relationship, and the first dependency relationship can be understood as when the initial file is operated, it will have certain effects on the compilation and operation of the dependent file. Influence.
  • the initial file information can be parsed first to determine the file described by the initial file information as the initial file indicated by it. Then, the dependent file that has a first dependency relationship with the initial file can be determined and obtained. File information such as the file name, file identifier, file size, and file type of the dependent file are regarded as dependent file information, and there are no restrictions on this.
  • the file compilation type can also be obtained by parsing the initial compilation information. Then, before obtaining the dependent file information that has a first dependency relationship with the initial file to which the initial file information belongs, the file compilation type and Initial file information determines the initial file, that is to say, it supports determining the compilation operation of the file to be performed according to the automatic compilation requirements, the specific operation type of the compilation operation (can be called the file compilation type), and then, based on the file compilation type Achieve targeted determination of initial files, effectively improve the accuracy of initial file determination, ensure compilation security and integrity, and greatly reduce the resource cost required for compilation.
  • multiple candidate files to be compiled can be determined based on the initial file information, and then a candidate compiled file whose file compilation type satisfies the specified compilation type is determined as the initial file.
  • the system module or component to which the file that supports the file compilation type belongs can be determined, and the initial file can be filtered out from the files included in the system module or component, without any limitation.
  • the file to be deleted indicated by the deletion operation type can be obtained according to the initial file information as the initial file, and when the file compilation type is a change operation type, Determine the change information content supported by the change operation type based on the initial file information, and use the file to which the change information content belongs as the initial file.
  • the operation used to delete all or part of the file can be called a deletion operation, and the information used to identify the type of the deletion operation can be called the deletion operation type; and the operation used to delete all or part of the file's contents can be called a deletion operation.
  • the modification operation can be called a change operation, and the information used to identify the type of change operation can be called a change operation type; and based on the change operation type, the information content to be changed can be called change information.
  • the change information content can be partial information content in a file, then the file to which the change information content belongs can be directly used as the initial file.
  • the embodiment of the present disclosure supports the accurate identification of the initial file that matches the deletion operation type or the change operation type, because the deletion operation type or the change operation type will affect the compilation and operation security of other associated dependent files. Therefore, when the dependent file information is determined based on the initial file that matches the deletion operation type or change operation type, it is effectively avoided that other associated dependent files are brought into the system when the deletion operation or change operation is performed on the initial file in the system. The impact can greatly improve the security of compilation.
  • S103 Generate incremental compilation information based on the initial compilation information and dependent file information.
  • the initial file information is obtained from the initial compilation information analysis, and the dependent file information that has a first dependency relationship with the initial file indicated by the initial file information is obtained, the initial compilation information and the dependent file information can be processed to generate Compilation information that can be directly read and called is used as incremental compilation information.
  • the resource information required to compile the initial file can be obtained based on the file name of the initial file, and based on the dependent file file name, obtain the resource information required to compile the dependent file, and then generate incremental compilation information based on the resource information required for the two parts of compilation. Since the incremental compilation information can carry the resource information required for the two parts of compilation, so , this incremental compilation information can support automated incremental compilation processing.
  • S104 Perform incremental compilation processing according to the incremental compilation information.
  • the resource information required for compilation can be determined from the incremental compilation information, and then the incremental compilation process is performed based on the resource information required for compilation. Make restrictions.
  • initial compilation information where the initial compilation information includes: initial file information, and obtaining dependent file information that has a first dependency relationship with the initial file indicated by the initial file information
  • the initial compilation information and dependent file information generate incremental compilation information, and perform incremental compilation processing based on the incremental compilation information, which can avoid incremental compilation encountering exceptions, effectively improve the security of incremental compilation, avoid incurring a large amount of compilation time costs, and effectively improve system modules development efficiency.
  • FIG. 2 is a schematic flowchart of an incremental compilation processing method proposed by another embodiment of the present disclosure.
  • the incremental compilation processing method includes:
  • S202 Obtain inter-module dependency information corresponding to the initial file information, where the inter-module dependency information describes the dependency between the first system module to which the initial file belongs and other system modules.
  • inter-module dependency information the information used to describe the interdependence between modules in the system can be called inter-module dependency information.
  • the inter-module dependency information can be specific. For example, for module A and module B sharing configuration files, compilation changes for A will affect When module B is compiled and run, there is a dependency relationship between module A and module B. Module B depends on the dependency of module A, which can be called inter-module dependency information.
  • the inter-module dependency information in the embodiment of the present disclosure can be configured by the project developer during the system development process.
  • the project developer can develop multiple modules and determine the modules with dependencies based on the calling and running relationships between different modules. , and then record the modules with dependencies in the dependency configuration file to support the rapid acquisition of inter-module dependency information corresponding to the initial file information during the incremental compilation process.
  • the inter-module dependency information corresponding to the initial file information may refer to determining the system module associated with the initial file, and using the inter-module dependency information of the associated system module as the inter-module dependency information corresponding to the initial file information. , there is no restriction on this.
  • the associated system module may refer to the system module to which the initial file belongs, or a system module that depends on the initial file when compiling and running. There is no limit to this.
  • S203 Obtain shared configuration information corresponding to the initial file information, where the shared configuration information describes the configuration parameters shared between the initial file and other files.
  • the configuration parameters may be the configuration parameters of the system's own hardware or the configuration parameters of the software required for system operation, and there is no limit to this.
  • shared configuration parameters refer to configuration parameters shared by the initial file and other files.
  • the parameter type, parameter meaning, parameter name and other information of the shared configuration parameters can be called shared configuration information.
  • the shared configuration information of this disclosed embodiment can be configured by the project developer during the system development process.
  • the project developer can develop multiple modules and determine the relationship between each file and other files based on the compilation and calling relationships between different files.
  • There are shared configuration parameters and then the information about the shared configuration parameters is extracted to obtain the shared configuration information, and the information of different files to which the shared configuration information belongs is recorded in the shared configuration file to support increment During the compilation process, the shared configuration information corresponding to the initial file information can be quickly obtained.
  • inter-module dependency information After obtaining the inter-module dependency information corresponding to the initial file information above, other system modules described by the inter-module dependency information can be determined, and then, the information about the files involved in other system modules is used as the dependent file information, or the information related to the initial file information is obtained.
  • shared configuration information After corresponding shared configuration information, based on the shared configuration information, determine the information of other files that share configuration parameters between the described and initial files as dependent file information, or you can also use the information based on inter-module dependency information and shared configuration information.
  • the file information of the intersection part is determined as the dependent file information, and there is no restriction on this.
  • the second system module that has a second dependency relationship with the first system module can also be determined based on inter-module dependency information, where the second The system module includes: a first dependent file, and determines a second dependent file with shared configuration parameters with the initial file based on the shared configuration information, and determines the first dependent file information and the second dependent file based on the first dependent file.
  • the second dependent file information forms dependent file information.
  • the system module associated with the initial file may be called a first system module, and the system module that has a dependency relationship with the first system module may be called a second system module.
  • system module A is directly dependent on system module B
  • dependency between system module A and system module B is a direct dependency
  • system module A is indirectly dependent on system module B (for example, through a third-party system module dependency)
  • the dependency between system module A and system module B is an indirect dependency
  • the compilation of system module A will Affects the compilation of system module B.
  • the compilation of system module B will not affect the compilation of system module B. It can be determined that the dependency relationship between system module A and system module B is a one-way dependency relationship.
  • system module A The compilation of system module B will affect the compilation of system module B, and conversely, the compilation of system module B will also affect the compilation of system module B. Then it can be determined that the dependency relationship between system module A and system module B is a two-way dependency relationship. This does not mean Make restrictions.
  • the dependency relationship between the different system modules mentioned above can be called the second dependency relationship.
  • the second system module may include multiple files, and the files included in the second system module may be used as first dependent files, and the first dependent files may be used to subsequently determine dependent file information.
  • the dependency file determined based on the inter-module dependency information is the first dependency file
  • the dependency file determined based on the shared configuration information is the second dependency file
  • dependent file information may be formed based on the first dependent file information of the first dependent file and the second dependent file information of the second dependent file.
  • the second system module in order to comprehensively identify the second system module that has a dependency relationship with the first system module based on the inter-module dependency information, it may be determined that there is a direct dependency with the first system module based on the inter-module dependency information.
  • the second system module of the relationship and determines the second system module that has an indirect dependency relationship with the first system module based on the inter-module dependency information, where the direct dependency relationship indicates the direct dependence between the first system module and the first system module,
  • the indirect dependency relationship indicates the indirect dependence between the first system module and the second system module via the third system module, and the direct dependency relationship and the indirect dependency relationship are jointly regarded as the second dependency relationship.
  • the shared configuration can be used information, determine the second dependent file information corresponding to the initial file information, and determine the second dependent file based on the second dependent file information.
  • the second dependent file information (such as the file name, file type, file summary, file identification, etc.) of the second dependent file can be determined based on the shared configuration information, it is possible to support the determination of the comprehensive third dependent file based on the identification of the second dependent file information.
  • the third dependent file in order to accurately and quickly identify the second dependent file that has a dependency relationship with the initial file based on the second dependent file information, and to improve the efficiency of the overall incremental compilation of the system, the third dependent file can be
  • the dependent file to which the second dependent file information belongs is directly used as the second dependent file, and the dependent file in the system module to which the second dependent file information belongs is used as the second dependent file, and there is a third dependency relationship with the dependent file to which the second dependent file information belongs.
  • the dependent file is used as the second dependent file.
  • the dependent file to which the second dependent file information belongs refers to the file directly described by the second dependent file information
  • the dependent file in the system module to which the second dependent file information belongs refers to the file in the system module associated with the second dependent file.
  • S205 Generate incremental compilation information based on the initial compilation information and dependent file information.
  • initial compilation information where the initial compilation information includes: initial file information, and obtaining dependent file information that has a first dependency relationship with the initial file indicated by the initial file information
  • the initial compilation information and dependent file information generate incremental compilation information, and perform incremental compilation processing based on the incremental compilation information, which can avoid incremental compilation encountering exceptions, effectively improve the security of incremental compilation, avoid incurring a large amount of compilation time costs, and effectively improve system modules development efficiency.
  • inter-module dependency information corresponding to the initial file information
  • the inter-module dependency information describes the dependence between the first system module to which the initial file belongs and other system modules
  • the shared configuration information describes the configuration parameters shared between the initial file and other files
  • Dependence file information ensures the comprehensiveness and accuracy of identification of dependency situations in the system, which can avoid exceptions in incremental compilation to the greatest extent and comprehensively improve the security of incremental compilation.
  • FIG. 3 is a schematic flowchart of an incremental compilation processing method proposed by another embodiment of the present disclosure.
  • the incremental compilation processing method includes:
  • initial compilation information includes: initial file information.
  • S302 Obtain dependent file information that has a first dependency relationship with the initial file indicated by the initial file information.
  • S303 Generate incremental compilation information based on the initial compilation information and dependent file information.
  • the file obtained by compiling the initial file may be called an initial compiled file.
  • compilation refers to the process of using a compiler to generate a target program from a source program written in a source language.
  • the compilation process can turn high-level language into a binary language that can be recognized by computers, and can be divided into five stages: lexical analysis; syntax analysis; semantic inspection and intermediate code generation; code optimization; and target code generation.
  • the main part is to perform lexical analysis and syntax analysis, also known as source program analysis. During the analysis process, grammatical errors are found and prompt information is given.
  • the initial compiled file can include: the intermediate code file generated after lexical analysis and syntax analysis of the initial file, and the target code file obtained after code optimization, and there is no limit to this.
  • the embodiments of the present disclosure may also delete the files in the first system module and the initial ones before incremental compilation.
  • the historical compilation file corresponding to the file and delete the historical compilation file corresponding to the dependent file in the second system module.
  • the existing compiled files in the first system module to which the initial file belongs can be called historical compiled files corresponding to the initial files
  • the existing compiled files in the second system module to which the dependent files belong can be called Historical compilation files corresponding to dependent files.
  • the files obtained by compiling the dependent files may be called dependent compiled files.
  • Dependency compiled files can include: intermediate code files generated after lexical analysis and syntax analysis of dependency files, and target code files obtained after code optimization. There is no limit to this.
  • S306 Package the first system module to which the initial compiled file belongs, and generate a module-level first file resource package.
  • the initial compiled file can be The first system module to which the compiled file belongs is packaged and a module-level file resource package is generated as the first file resource package.
  • S307 Package the second system module to which the dependent compiled file belongs, and generate a module-level second file resource package.
  • the dependency compilation can be The second system module to which the file belongs is packaged and a module-level file resource package is generated as the second file resource package.
  • the first file resource package and the second file resource package obtained by the above packaging process can be used to build a complete system.
  • S308 Build the target system based on the first file resource package, the second file resource package, and the third file resource package; wherein the third file resource package is the file resource package corresponding to the third system module, and the third system module is the same as the first file resource package. There is no dependency relationship between the system module and the second system module.
  • the embodiment of the present disclosure can also obtain the third file resource package of the third system module that has not been incrementally compiled.
  • the third system The module can be a system module that is not dependent on the initial file as determined based on the above method steps.
  • the third file resource package can be compiled before incremental compilation, and the third system module can be directly pulled.
  • the third file resource package supports the combination of the first file resource package, the second file resource package, and the third file resource package to build a complete product system as the target system.
  • the initial compilation information includes: initial file information, and obtaining dependent file information that has a first dependency relationship with the initial file indicated by the initial file information
  • the initial compilation information and dependent file information generate incremental compilation information, and perform incremental compilation processing based on the incremental compilation information, which can avoid incremental compilation encountering exceptions, effectively improve the security of incremental compilation, avoid incurring a large amount of compilation time costs, and effectively improve system modules development efficiency.
  • the initial compiled file is obtained, compiling the dependency file to which the dependent file information belongs, obtaining the dependent compiled file, and packaging the first system module to which the initial compiled file belongs to generate a module.
  • the first file resource package at the level, and the second system module to which the dependent compiled file belongs are packaged to generate a second file resource package at the module level, which can effectively support system-level module integration and facilitate module-level file resource information.
  • the target system is constructed based on the first file resource package, the second file resource package, and the third file resource package, where the third file resource package is the file resource package corresponding to the third system module, and the third system module is the same as the first system module. There is no dependency between the module and the second system module, which can effectively improve the integration efficiency of the target system and improve the integration and release effect of the target system after incremental compilation.
  • FIG. 4 is a schematic structural diagram of an incremental compilation processing device proposed by an embodiment of the present disclosure.
  • the incremental compilation processing device 40 includes:
  • the first acquisition module 401 is used to acquire initial compilation information, where the initial compilation information includes: initial file information;
  • the second acquisition module 402 is used to acquire dependent file information that has a first dependency relationship with the initial file indicated by the initial file information;
  • the generation module 403 is used to generate incremental compilation information based on the initial compilation information and dependent file information.
  • the processing module 404 is used to perform incremental compilation processing according to the incremental compilation information.
  • the initial compilation information also includes: file compilation type; wherein, it also includes:
  • the determination module 405 is configured to determine the initial file according to the file compilation type and the initial file information before obtaining dependent file information that has a first dependency relationship with the initial file to which the initial file information belongs.
  • the determining module 405 is specifically used for:
  • the file to be deleted indicated by the deletion operation type is obtained according to the initial file information as the initial file;
  • the file compilation type is a change operation type
  • the change information content supported by the change operation type is determined based on the initial file information, and the file to which the change information content belongs is used as the initial file.
  • the second acquisition module 402 includes:
  • the first acquisition sub-module 4021 is used to obtain inter-module dependency information corresponding to the initial file information, where the inter-module dependency information describes the dependency between the first system module to which the initial file belongs and other system modules;
  • the second acquisition sub-module 4022 is used to acquire the shared configuration information corresponding to the initial file information, where the shared configuration information describes the configuration parameters shared between the initial file and other files;
  • the third acquisition sub-module 4023 is used to acquire dependent file information based on inter-module dependency information and shared configuration information.
  • the third acquisition sub-module 4023 is specifically used for:
  • Dependent file information is formed based on the first dependent file information of the first dependent file and the second dependent file information of the second dependent file.
  • the third acquisition sub-module 4023 is also used for:
  • inter-module dependency information determine the second system module that has a direct dependency relationship with the first system module
  • the direct dependency relationship represents the direct dependence between the first system module and the first system module
  • the indirect dependency relationship represents the indirect dependence between the first system module and the second system module via the third system module
  • the direct dependency relationship and the indirect dependency relationship is shared as a secondary dependency.
  • the third acquisition sub-module 4023 is also used for:
  • the third acquisition sub-module 4023 is also used for:
  • the dependent file that has a third dependency relationship with the dependent file to which the second dependent file information belongs is used as the second dependent file.
  • the processing module 404 is specifically used to:
  • the processing module 404 is also used to:
  • the processing module 404 is also used to:
  • the third file resource package is the file resource package corresponding to the third system module, and the third system module has no dependency relationship with either the first system module or the second system module.
  • the present disclosure also provides an incremental compilation processing device.
  • the incremental compilation processing method provided by the embodiment corresponds to the incremental compilation processing method. Therefore, the implementation of the incremental compilation processing method is also applicable to the incremental compilation processing device provided by the embodiment of the present disclosure, and will not be described in detail in the embodiment of the present disclosure.
  • the initial compilation information includes: initial file information, and obtaining dependent file information that has a first dependency relationship with the initial file indicated by the initial file information, according to the initial compilation information and dependent file information,
  • Generating incremental compilation information and performing incremental compilation processing based on the incremental compilation information can avoid incremental compilation encountering exceptions, effectively improve the security of incremental compilation, avoid incurring a large amount of compilation time costs, and effectively improve the performance of system modules. Development efficiency.
  • the present disclosure also proposes an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor.
  • the processor executes the program, the aforementioned embodiments of the present disclosure are implemented.
  • the proposed incremental compilation processing method is not limited to: a processor, a processor, and a computer program stored in the memory and executable on the processor.
  • the present disclosure also proposes a non-transitory computer-readable storage medium on which a computer program is stored.
  • the program is executed by a processor, the incremental compilation processing method as proposed in the previous embodiments of the present disclosure is implemented.
  • the present disclosure also proposes a computer program product.
  • the instruction processor in the computer program product is executed, the incremental compilation processing method proposed in the previous embodiments of the present disclosure is executed.
  • FIG. 6 illustrates a block diagram of an exemplary electronic device suitable for implementing embodiments of the present disclosure.
  • the electronic device 12 shown in FIG. 6 is only an example and should not bring any limitations to the functions and scope of use of the embodiments of the present disclosure.
  • electronic device 12 is embodied in the form of a general computing device.
  • Components of electronic device 12 may include, but are not limited to: one or more processors or processing units 16, system memory 28, and a bus 18 connecting various system components (including system memory 28 and processing unit 16).
  • Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics accelerated port, a processor, or a local bus using any of a variety of bus structures.
  • these architectures include but are not limited to Industry Standard Architecture (hereinafter referred to as: ISA) bus, Micro Channel Architecture (Micro Channel Architecture; hereafter referred to as: MAC) bus, enhanced ISA bus, video electronics Standards Association (Video Electronics Standards Association; hereinafter referred to as: VESA) local bus and Peripheral Component Interconnection (hereinafter referred to as: PCI) bus.
  • ISA Industry Standard Architecture
  • MAC Micro Channel Architecture
  • VESA Video Electronics Standards Association
  • PCI Peripheral Component Interconnection
  • Electronic device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by electronic device 12, including volatile and nonvolatile media, removable and non-removable media.
  • the memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (Random Access Memory; hereinafter referred to as: RAM) 30 and/or cache memory 32.
  • Electronic device 12 may further include other removable/non-removable, volatile/non-volatile computer system storage media.
  • storage system 34 may be used to read and write to non-removable, non-volatile magnetic media (not shown in Figure 6, commonly referred to as a "hard drive").
  • a disk drive may be provided for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and a disk drive for reading and writing a removable non-volatile optical disk (e.g., a compact disk read-only memory).
  • Disc Read Only Memory hereinafter referred to as: CD-ROM
  • DVD-ROM Digital Video Disc Read Only Memory
  • each drive may be connected to bus 18 through one or more data media interfaces.
  • Memory 28 may include at least one program product having a set (eg, at least one) of program modules configured to perform the functions of embodiments of the present disclosure.
  • a program/utility 40 having a set of (at least one) program modules 42 may be stored, for example, in memory 28 , each of these examples or some combination may include the implementation of a network environment.
  • Program modules 42 generally perform functions and/or methods in the embodiments described in this disclosure.
  • Electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), may also communicate with one or more devices that enable a user to interact with electronic device 12, and/or with Any device (eg, network card, modem, etc.) that enables the electronic device 12 to communicate with one or more other computing devices. This communication may occur through input/output (I/O) interface 22.
  • the electronic device 12 can also communicate with one or more networks (such as a local area network (Local Area Network; hereinafter referred to as: LAN), a wide area network (Wide Area Network; hereinafter referred to as: WAN)) and/or a public network, such as the Internet, through the network adapter 20 ) communication.
  • networks such as a local area network (Local Area Network; hereinafter referred to as: LAN), a wide area network (Wide Area Network; hereinafter referred to as: WAN)
  • a public network such as the Internet
  • network adapter 20 communicates with other modules of electronic device 12 via bus 18 .
  • other hardware and/or software modules may be used in conjunction with electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives And data backup storage system, etc.
  • the processing unit 16 executes programs stored in the system memory 28 to perform various functional applications and data processing, such as implementing the incremental compilation processing method mentioned in the previous embodiment.
  • various parts of the present disclosure may be implemented in hardware, software, firmware, or combinations thereof.
  • various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system.
  • a logic gate circuit with a logic gate circuit for implementing a logic function on a data signal.
  • Discrete logic circuits application specific integrated circuits with suitable combinational logic gates, programmable gate arrays (PGA), field programmable gate arrays (FPGA), etc.
  • the program can be stored in a computer-readable storage medium.
  • the program can be stored in a computer-readable storage medium.
  • each functional unit in various embodiments of the present disclosure may be integrated into one processing module, each unit may exist physically alone, or two or more units may be integrated into one module.
  • the above integrated modules can be implemented in the form of hardware or software function modules. If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
  • the storage media mentioned above can be read-only memory, magnetic disks or optical disks, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

Provided in the present disclosure are an incremental compilation processing method and apparatus, and an electronic device and a storage medium. The method comprises: acquiring initial compilation information, wherein the initial compilation information comprises initial file information; acquiring information of a dependent file, which has a first dependency relationship with an initial file indicated by the initial file information; generating incremental compilation information according to the initial compilation information and the information of the dependent file; and performing incremental compilation processing according to the incremental compilation information. By means of the present disclosure, exceptions in incremental compilation can be prevented, thereby effectively improving the security of incremental compilation, and the introduction of a large amount of compilation time costs can be avoided, thereby effectively improving the efficiency of system module development.

Description

增量编译处理方法、装置、电子设备及存储介质Incremental compilation processing method, device, electronic equipment and storage medium 技术领域Technical field
本公开涉及计算机技术领域,尤其涉及一种增量编译处理方法、装置、电子设备及存储介质。The present disclosure relates to the field of computer technology, and in particular, to an incremental compilation processing method, device, electronic equipment and storage medium.
背景技术Background technique
当前在构建商用级别产品系统过程中,会为每个系统的所有组件提供自动化编译和部署的工具,这是必不可少的整体开发环节中的重要系统组成部分。Currently, in the process of building commercial-level product systems, automated compilation and deployment tools are provided for all components of each system, which is an essential and important system component in the overall development process.
相关技术中,原有的自动化构建系统,虽然支持多线程对各个模块进行并发编译,以及增量编译,但增量编译的实现方式,是基于整体编译通过后,对当前有变化的文件进行编译。In related technologies, although the original automated build system supports multi-threaded concurrent compilation of each module and incremental compilation, the implementation of incremental compilation is based on compiling the currently changed files after the overall compilation is passed. .
这种方式下,当系统模块间存在复杂依赖关系时,增量编译容易遇到异常,影响增量编译的安全性,并且容易带入大量的编译时间成本,影响系统模块的开发效率。In this way, when there are complex dependencies between system modules, incremental compilation is prone to encounter exceptions, which affects the security of incremental compilation. It also easily brings in a lot of compilation time costs and affects the development efficiency of system modules.
发明内容Contents of the invention
本公开旨在至少在一定程度上解决相关技术中的技术问题之一。The present disclosure aims to solve one of the technical problems in the related art, at least to a certain extent.
为此,本公开的目的在于提出一种增量编译处理方法、装置、电子设备、存储介质及计算机程序产品,能够避免增量编译遇到异常,有效提升增量编译的安全性,避免带入大量的编译时间成本,有效提升系统模块的开发效率。To this end, the purpose of this disclosure is to propose an incremental compilation processing method, device, electronic equipment, storage medium and computer program product that can avoid incremental compilation encountering exceptions, effectively improve the security of incremental compilation, and avoid bringing in A large amount of compilation time cost effectively improves the development efficiency of system modules.
本公开第一方面实施例提出的增量编译处理方法,包括:获取初始编译信息,其中,初始编译信息包括:初始文件信息;获取与初始文件信息指示的初始文件存在第一依赖关系的依赖文件信息;根据初始编译信息和依赖文件信息,生成增量编译信息;以及根据增量编译信息进行增量编译处理。The incremental compilation processing method proposed by the embodiment of the first aspect of the present disclosure includes: obtaining initial compilation information, where the initial compilation information includes: initial file information; and obtaining dependent files that have a first dependency relationship with the initial file indicated by the initial file information. information; generate incremental compilation information based on the initial compilation information and dependent file information; and perform incremental compilation processing based on the incremental compilation information.
在一种实施方式中,初始编译信息还包括:文件编译类型;其中,在获取与初始文件信息所属初始文件存在第一依赖关系的依赖文件信息之前,还包括:根据文件编译类型和初始文件信息,确定初始文件。In one embodiment, the initial compilation information also includes: file compilation type; wherein, before obtaining the dependent file information that has a first dependency relationship with the initial file to which the initial file information belongs, it also includes: according to the file compilation type and the initial file information , determine the initial file.
在一种实施方式中,根据文件编译类型和初始文件信息,确定初始文件,包括:如果文件编译类型是删除操作类型,则根据初始文件信息获取删除操作类型所指示的待删除文件作为初始文件;如果文件编译类型是变更操作类型,则根据初始文件信息确定变更操作类型所支持的变更信息内容,并将变更信息内容所属的文件作为初始文件。In one implementation, determining the initial file based on the file compilation type and initial file information includes: if the file compilation type is a deletion operation type, obtaining the file to be deleted indicated by the deletion operation type as the initial file according to the initial file information; If the file compilation type is a change operation type, the change information content supported by the change operation type is determined based on the initial file information, and the file to which the change information content belongs is used as the initial file.
在一种实施方式中,获取与初始文件信息指示的初始文件存在第一依赖关系的依赖文件信息,包括:获取与初始文件信息对应的模块间依赖信息,其中,模块间依赖信息描述初始文件所属第一系统模块与其他系统模块间的依赖情况;获取与初始文件信息对应的共享配置信息,其中,共享配置信息描述初始文件与其他文件之间所共享配置参数的情况;根据模块间依赖信息和共享配置信息,获取依赖文件信息。In one implementation, obtaining dependent file information that has a first dependency relationship with the initial file indicated by the initial file information includes: obtaining inter-module dependency information corresponding to the initial file information, wherein the inter-module dependency information describes where the initial file belongs Dependencies between the first system module and other system modules; obtain shared configuration information corresponding to the initial file information, where the shared configuration information describes the configuration parameters shared between the initial file and other files; according to the inter-module dependency information and Share configuration information and obtain dependency file information.
在一种实施方式中,根据模块间依赖信息和共享配置信息,获取依赖文件信息,包括:根据模块间依赖信息,确定与第一系统模块存在第二依赖关系的第二系统模块,其中,第二系统模块中包括:第一依赖文件;根据共享配置信息,确定与初始文件之间具有共享配置参数的第二依赖文件;根据第一依赖文件的第一依赖文件信息和第二依赖文件的第二依赖文件信息,形成依赖文件信息。In one implementation, obtaining dependency file information based on inter-module dependency information and shared configuration information includes: determining a second system module that has a second dependency relationship with the first system module based on the inter-module dependency information, wherein: The second system module includes: a first dependency file; according to the shared configuration information, determine a second dependency file with shared configuration parameters with the initial file; according to the first dependency file information of the first dependency file and the second dependency file of the second dependency file. 2. Dependent file information forms dependent file information.
在一种实施方式中,根据模块间依赖信息,确定与第一系统模块存在第二依赖关系的第二系统模块,包括:根据模块间依赖信息,确定与第一系统模块存在直接依赖关系的第二系统模块;根据模块间依赖信息,确定与第一系统模块存在间接依赖关系的第二系统模块;其中,直接依赖关系表示第一系统模块与第一系统模块之间直接依赖,间接依赖关系表示第一系统模块与第二系统模块之间经由第三系统模块间接依赖,直接依赖关系和间接依赖关系被共同作为第二依赖关系。In one implementation, determining a second system module that has a second dependency relationship with the first system module based on the inter-module dependency information includes: determining a third system module that has a direct dependency relationship with the first system module based on the inter-module dependency information. Two system modules; according to inter-module dependency information, determine the second system module that has an indirect dependency relationship with the first system module; wherein, the direct dependency relationship indicates the direct dependence between the first system module and the first system module, and the indirect dependency relationship indicates The first system module and the second system module are indirectly dependent on each other via the third system module, and the direct dependency relationship and the indirect dependency relationship are jointly regarded as the second dependency relationship.
在一种实施方式中,根据共享配置信息,确定与初始文件之间具有共享配置参数的第二依赖文件,包括:根据共享配置信息,确定与初始文件信息所对应的第二依赖文件信息;根据第二依赖文件信息,确定第二依赖文件。In one implementation, determining a second dependent file with shared configuration parameters with the initial file based on the shared configuration information includes: determining second dependent file information corresponding to the initial file information based on the shared configuration information; The second dependent file information determines the second dependent file.
在一种实施方式中,根据第二依赖文件信息,确定第二依赖文件,包括:将第二依赖文件信息所属 依赖文件作为第二依赖文件;将第二依赖文件信息所属系统模块中的依赖文件作为第二依赖文件;将与第二依赖文件信息所属依赖文件存在第三依赖关系的依赖文件作为第二依赖文件。In one implementation, determining the second dependent file based on the second dependent file information includes: using the dependent file to which the second dependent file information belongs as the second dependent file; using the dependent file in the system module to which the second dependent file information belongs. As the second dependent file; use the dependent file that has a third dependency relationship with the dependent file to which the second dependent file information belongs as the second dependent file.
在一种实施方式中,根据增量编译信息进行增量编译处理,包括:对初始文件信息所属初始文件进行编译处理,得到初始编译文件;对依赖文件信息所属依赖文件进行编译处理,得到依赖编译文件;对初始编译文件所属的第一系统模块进行打包处理,生成模块级的第一文件资源包;对依赖编译文件所属的第二系统模块进行打包处理,生成模块级的第二文件资源包。In one implementation, incremental compilation processing is performed according to the incremental compilation information, including: compiling the initial file to which the initial file information belongs to obtain the initial compiled file; compiling the dependent file to which the dependent file information belongs to obtain the dependent compilation file; package the first system module to which the initial compiled file belongs to generate a module-level first file resource package; package the second system module to which the dependent compiled file belongs to generate a module-level second file resource package.
在一种实施方式中,根据增量编译信息进行增量编译处理,还包括:删除第一系统模块中与初始文件对应的历史编译文件;删除第二系统模块中与依赖文件对应的历史编译文件。In one implementation, performing incremental compilation processing based on the incremental compilation information also includes: deleting historical compilation files corresponding to the initial files in the first system module; deleting historical compilation files corresponding to the dependent files in the second system module. .
在一种实施方式中,根据增量编译信息进行增量编译处理,还包括:根据第一文件资源包、第二文件资源包,以及第三文件资源包构建目标系统;其中,第三文件资源包是第三系统模块对应的文件资源包,第三系统模块与第一系统模块和第二系统模块均不存在依赖关系。In one implementation, performing incremental compilation processing according to the incremental compilation information also includes: building the target system according to the first file resource package, the second file resource package, and the third file resource package; wherein, the third file resource The package is the file resource package corresponding to the third system module, and the third system module has no dependency relationship with either the first system module or the second system module.
本公开第一方面实施例提出的增量编译处理方法,通过获取初始编译信息,其中,初始编译信息包括:初始文件信息,获取与初始文件信息指示的初始文件存在第一依赖关系的依赖文件信息,根据初始编译信息和依赖文件信息,生成增量编译信息,以及根据增量编译信息进行增量编译处理,能够避免增量编译遇到异常,有效提升增量编译的安全性,避免带入大量的编译时间成本,有效提升系统模块的开发效率。The incremental compilation processing method proposed in the first aspect of the present disclosure obtains initial compilation information, where the initial compilation information includes: initial file information, and obtains dependent file information that has a first dependency relationship with the initial file indicated by the initial file information. , generate incremental compilation information based on the initial compilation information and dependent file information, and perform incremental compilation processing based on the incremental compilation information, which can avoid incremental compilation encountering exceptions, effectively improve the security of incremental compilation, and avoid bringing in a large number of Compilation time cost, effectively improving the development efficiency of system modules.
本公开第二方面实施例提出的增量编译处理装置,包括:第一获取模块,用于获取初始编译信息,其中,初始编译信息包括:初始文件信息;第二获取模块,用于获取与初始文件信息指示的初始文件存在第一依赖关系的依赖文件信息;生成模块,用于根据初始编译信息和依赖文件信息,生成增量编译信息;以及处理模块,用于根据增量编译信息进行增量编译处理。The incremental compilation processing device proposed by the embodiment of the second aspect of the present disclosure includes: a first acquisition module, used to acquire initial compilation information, where the initial compilation information includes: initial file information; a second acquisition module, used to acquire and initialize The initial file indicated by the file information has dependent file information of the first dependency relationship; a generation module is used to generate incremental compilation information based on the initial compilation information and dependent file information; and a processing module is used to perform incremental compilation information based on the incremental compilation information. Compilation processing.
在一种实施方式中,初始编译信息还包括:文件编译类型;其中,还包括:确定模块,用于在获取与初始文件信息所属初始文件存在第一依赖关系的依赖文件信息之前,根据文件编译类型和初始文件信息,确定初始文件。In one embodiment, the initial compilation information also includes: file compilation type; wherein, it also includes: a determination module, configured to compile according to the file before obtaining the dependent file information that has a first dependency relationship with the initial file to which the initial file information belongs. Type and initial file information to determine the initial file.
在一种实施方式中,确定模块,具体用于:如果文件编译类型是删除操作类型,则根据初始文件信息获取删除操作类型所指示的待删除文件作为初始文件;如果文件编译类型是变更操作类型,则根据初始文件信息确定变更操作类型所支持的变更信息内容,并将变更信息内容所属的文件作为初始文件。In one implementation, the determination module is specifically configured to: if the file compilation type is a deletion operation type, obtain the file to be deleted indicated by the deletion operation type according to the initial file information as the initial file; if the file compilation type is a change operation type , then the change information content supported by the change operation type is determined based on the initial file information, and the file to which the change information content belongs is used as the initial file.
在一种实施方式中,第二获取模块,包括:第一获取子模块,用于获取与初始文件信息对应的模块间依赖信息,其中,模块间依赖信息描述初始文件所属第一系统模块与其他系统模块间的依赖情况;第二获取子模块,用于获取与初始文件信息对应的共享配置信息,其中,共享配置信息描述初始文件与其他文件之间所共享配置参数的情况;第三获取子模块,用于根据模块间依赖信息和共享配置信息,获取依赖文件信息。In one implementation, the second acquisition module includes: a first acquisition sub-module, used to acquire inter-module dependency information corresponding to the initial file information, wherein the inter-module dependency information describes the relationship between the first system module to which the initial file belongs and other Dependencies between system modules; the second acquisition sub-module is used to obtain the shared configuration information corresponding to the initial file information, where the shared configuration information describes the configuration parameters shared between the initial file and other files; the third acquisition sub-module Module is used to obtain dependency file information based on inter-module dependency information and shared configuration information.
在一种实施方式中,第三获取子模块,具体用于:根据模块间依赖信息,确定与第一系统模块存在第二依赖关系的第二系统模块,其中,第二系统模块中包括:第一依赖文件;根据共享配置信息,确定与初始文件之间具有共享配置参数的第二依赖文件;根据第一依赖文件的第一依赖文件信息和第二依赖文件的第二依赖文件信息,形成依赖文件信息。In one implementation, the third acquisition sub-module is specifically configured to determine, based on inter-module dependency information, a second system module that has a second dependency relationship with the first system module, wherein the second system module includes: A dependent file; according to the shared configuration information, determine a second dependent file with shared configuration parameters with the initial file; form a dependency based on the first dependent file information of the first dependent file and the second dependent file information of the second dependent file File information.
在一种实施方式中,第三获取子模块,还用于:根据模块间依赖信息,确定与第一系统模块存在直接依赖关系的第二系统模块;根据模块间依赖信息,确定与第一系统模块存在间接依赖关系的第二系统模块;其中,直接依赖关系表示第一系统模块与第一系统模块之间直接依赖,间接依赖关系表示第一系统模块与第二系统模块之间经由第三系统模块间接依赖,直接依赖关系和间接依赖关系被共同作为第二依赖关系。In one implementation, the third acquisition sub-module is also used to: determine the second system module that has a direct dependency relationship with the first system module based on the inter-module dependency information; determine the second system module that has a direct dependency relationship with the first system module based on the inter-module dependency information. The second system module has an indirect dependency relationship between the modules; where the direct dependency relationship indicates the direct dependence between the first system module and the first system module, and the indirect dependency relationship indicates that the first system module and the second system module pass through the third system Module indirect dependencies, direct dependencies and indirect dependencies are jointly regarded as secondary dependencies.
在一种实施方式中,第三获取子模块,还用于:根据共享配置信息,确定与初始文件信息所对应的第二依赖文件信息;根据第二依赖文件信息,确定第二依赖文件。In one implementation, the third acquisition sub-module is further configured to: determine second dependent file information corresponding to the initial file information based on the shared configuration information; determine the second dependent file based on the second dependent file information.
在一种实施方式中,第三获取子模块,还用于:将第二依赖文件信息所属依赖文件作为第二依赖文件;将第二依赖文件信息所属系统模块中的依赖文件作为第二依赖文件;将与第二依赖文件信息所属依赖文件存在第三依赖关系的依赖文件作为第二依赖文件。In one implementation, the third acquisition sub-module is also configured to: use the dependent file to which the second dependent file information belongs as the second dependent file; use the dependent file in the system module to which the second dependent file information belongs as the second dependent file. ; Use the dependent file that has a third dependency relationship with the dependent file to which the second dependent file information belongs as the second dependent file.
在一种实施方式中,处理模块,具体用于:对初始文件信息所属初始文件进行编译处理,得到初始编译文件;对依赖文件信息所属依赖文件进行编译处理,得到依赖编译文件;对初始编译文件所属的第一系统模块进行打包处理,生成模块级的第一文件资源包;对依赖编译文件所属的第二系统模块进行打包处理,生成模块级的第二文件资源包。In one implementation, the processing module is specifically configured to: compile the initial file to which the initial file information belongs to obtain an initial compiled file; compile and process the dependent file to which the dependent file information belongs to obtain a dependent compiled file; compile the initial compiled file The first system module to which it belongs is packaged to generate a module-level first file resource package; the second system module to which the dependent compiled file belongs is packaged to generate a module-level second file resource package.
在一种实施方式中,处理模块,还用于:删除第一系统模块中与初始文件对应的历史编译文件;删除第二系统模块中与依赖文件对应的历史编译文件。In one implementation, the processing module is also configured to: delete the historical compilation file corresponding to the initial file in the first system module; delete the historical compilation file corresponding to the dependent file in the second system module.
在一种实施方式中,处理模块,还用于:根据第一文件资源包、第二文件资源包,以及第三文件资源包构建目标系统;其中,第三文件资源包是第三系统模块对应的文件资源包,第三系统模块与第一系统模块和第二系统模块均不存在依赖关系。In one implementation, the processing module is also configured to: build the target system based on the first file resource package, the second file resource package, and the third file resource package; wherein the third file resource package is corresponding to the third system module file resource package, the third system module has no dependency on either the first system module or the second system module.
本公开第二方面实施例提出的增量编译处理装置,通过获取初始编译信息,其中,初始编译信息包括:初始文件信息,获取与初始文件信息指示的初始文件存在第一依赖关系的依赖文件信息,根据初始编译信息和依赖文件信息,生成增量编译信息,以及根据增量编译信息进行增量编译处理,能够避免增量编译遇到异常,有效提升增量编译的安全性,避免带入大量的编译时间成本,有效提升系统模块的开发效率。The incremental compilation processing device proposed by the embodiment of the second aspect of the present disclosure acquires the dependent file information that has a first dependency relationship with the initial file indicated by the initial file information by obtaining initial compilation information, where the initial compilation information includes: initial file information. , generate incremental compilation information based on the initial compilation information and dependent file information, and perform incremental compilation processing based on the incremental compilation information, which can avoid incremental compilation encountering exceptions, effectively improve the security of incremental compilation, and avoid bringing in a large number of Compilation time cost, effectively improving the development efficiency of system modules.
本公开第三方面实施例提出了一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,处理器执行程序时,实现如本公开第一方面实施例提出的增量编译处理方法。The third embodiment of the present disclosure provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the implementation of the first embodiment of the present disclosure is implemented. The proposed incremental compilation processing method.
本公开第四方面实施例提出了一种非临时性计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如本公开第一方面实施例提出的增量编译处理方法。The fourth embodiment of the present disclosure provides a non-transitory computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the incremental compilation processing method as proposed in the first embodiment of the present disclosure is implemented. .
本公开第五方面实施例提出了一种计算机程序产品,当计算机程序产品中的指令由处理器执行时,执行如本公开第一方面实施例提出的增量编译处理方法。The fifth embodiment of the present disclosure provides a computer program product. When instructions in the computer program product are executed by a processor, the incremental compilation processing method proposed in the first embodiment of the present disclosure is executed.
本公开附加的方面和优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本公开的实践了解到。Additional aspects and advantages of the disclosure 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 disclosure.
附图说明Description of the drawings
本公开上述的和/或附加的方面和优点从下面结合附图对实施例的描述中将变得明显和容易理解,其中:The above and/or additional aspects and advantages of the present disclosure will become apparent and readily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
图1是本公开一实施例提出的增量编译处理方法的流程示意图;Figure 1 is a schematic flowchart of an incremental compilation processing method proposed by an embodiment of the present disclosure;
图2是本公开另一实施例提出的增量编译处理方法的流程示意图;Figure 2 is a schematic flowchart of an incremental compilation processing method proposed by another embodiment of the present disclosure;
图3是本公开另一实施例提出的增量编译处理方法的流程示意图;Figure 3 is a schematic flowchart of an incremental compilation processing method proposed by another embodiment of the present disclosure;
图4是本公开一实施例提出的增量编译处理装置的结构示意图;Figure 4 is a schematic structural diagram of an incremental compilation processing device proposed by an embodiment of the present disclosure;
图5是本公开另一实施例提出的增量编译处理装置的结构示意图;Figure 5 is a schematic structural diagram of an incremental compilation processing device proposed by another embodiment of the present disclosure;
图6示出了适于用来实现本公开实施方式的示例性电子设备的框图。6 illustrates a block diagram of an exemplary electronic device suitable for implementing embodiments of the present disclosure.
具体实施方式Detailed ways
下面详细描述本公开的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,仅用于解释本公开,而不能理解为对本公开的限制。相反,本公开的实施例包括落入所附加权利要求书的精神和内涵范围内的所有变化、修改和等同物。Embodiments of the present disclosure are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the drawings are exemplary and are only used to explain the present disclosure and are not to be construed as limitations of the present disclosure. On the contrary, the disclosed embodiments include all changes, modifications and equivalents falling within the spirit and scope of the appended claims.
图1是本公开一实施例提出的增量编译处理方法的流程示意图。FIG. 1 is a schematic flowchart of an incremental compilation processing method proposed by an embodiment of the present disclosure.
需要说明的是,本实施例的增量编译处理方法的执行主体为增量编译处理装置,该装置可以由软件和/或硬件的方式实现,该装置可以配置在电子设备中,对此不做限制。It should be noted that the execution subject of the incremental compilation processing method in this embodiment is an incremental compilation processing device. This device can be implemented by software and/or hardware. The device can be configured in an electronic device. This is not done. limit.
电子设备,是一种经由通信设施向其他设备发送数据或接收其他设备数据的设备,也即是说,该电子设备可以例如为能够进行网络通信连接的终端设备、计算机设备等,对此不做限制。An electronic device is a device that sends data to or receives data from other devices via communication facilities. That is to say, the electronic device can be, for example, a terminal device, a computer device, etc. that are capable of network communication connections. This does not mean limit.
如图1所示,该增量编译处理方法,包括:As shown in Figure 1, the incremental compilation processing method includes:
S101:获取初始编译信息,其中,初始编译信息包括:初始文件信息。S101: Obtain initial compilation information, where the initial compilation information includes: initial file information.
在一些应用场景中,例如在构建商用级别产品系统过程中,会为每个系统的所有组件提供自动化编译和部署的工具,则用于支持对系统中某个组件或者模块进行自动化编译的配置、接口、处理逻辑等相关的信息,可以被称为初始编译信息,该初始编译信息,可以被用于支持相应组件或者模块的自动化编译,对此不做限制。In some application scenarios, such as in the process of building a commercial-level product system, automated compilation and deployment tools will be provided for all components of each system, which are used to support the configuration of automated compilation of a certain component or module in the system. Related information such as interfaces and processing logic can be called initial compilation information. This initial compilation information can be used to support automated compilation of corresponding components or modules, and there is no limit to this.
其中,用于描述文件的信息,可以被称为文件信息,该文件可以例如是系统中模块或者组件中的配置文件、计算机程序代码文件等等,而在确定需要对系统进行自动化编译时,基于自动化编译需求所确定的文件信息,可以被称为初始文件信息。Among them, the information used to describe the file can be called file information. The file can be, for example, a configuration file in a module or component in the system, a computer program code file, etc., and when it is determined that the system needs to be automatically compiled, based on The file information determined by the automated compilation requirements can be called initial file information.
本公开实施例中,可以在确定需要对系统进行自动化编译时,基于自动化编译需求确定相应的文件名称、文件标识、文件大小,以及文件类型等文件信息作为初始文件信息,而后将该初始文件信息封装至初始编译信息中,以支持本公开实施例中的增量编译处理方法。In the embodiment of the present disclosure, when it is determined that the system needs to be automatically compiled, the corresponding file name, file identification, file size, file type and other file information can be determined as the initial file information based on the automatic compilation requirements, and then the initial file information is Encapsulated into the initial compilation information to support the incremental compilation processing method in the embodiment of the present disclosure.
S102:获取与初始文件信息指示的初始文件存在第一依赖关系的依赖文件信息。S102: Obtain dependent file information that has a first dependency relationship with the initial file indicated by the initial file information.
上述在获取初始编译信息后,可以从初始编译信息中解析得到初始文件信息,而后,基于该初始文件信息分析需求进行编译处理的其它文件的信息。After the initial compilation information is obtained, the initial file information can be parsed from the initial compilation information, and then, based on the initial file information, the information of other files required for compilation processing can be analyzed.
其中,基于该初始文件信息分析需求进行编译处理的文件,可以被称为依赖文件,如果初始文件信息用于描述产生变更、或者需要对其进行删除的初始文件,则相应的,依赖文件,可以被视为与该初始文件存在依赖关系的文件,或者与该初始文件共享配置参数的文件,对此不做限制。Among them, the files compiled based on the initial file information analysis requirements can be called dependent files. If the initial file information is used to describe the initial files that are changed or need to be deleted, then the corresponding dependent files can be There are no restrictions on files that are considered to have dependencies on the initial file, or files that share configuration parameters with the initial file.
其中,初始文件和依赖文件之间的依赖关系,可以被称为第一依赖关系,而第一依赖关系,可以理解为当对初始文件进行操作时,会对依赖文件的编译与运行产生一定的影响。Among them, the dependency relationship between the initial file and the dependent file can be called the first dependency relationship, and the first dependency relationship can be understood as when the initial file is operated, it will have certain effects on the compilation and operation of the dependent file. Influence.
本公开实施例中,可以首先对初始文件信息进行解析处理,确定初始文件信息所描述的文件作为其所指示的初始文件,而后,可以确定与初始文件存在第一依赖关系的依赖文件,并获取依赖文件的文件名称、文件标识、文件大小,以及文件类型等文件信息作为依赖文件信息,对此不做限制。In the embodiment of the present disclosure, the initial file information can be parsed first to determine the file described by the initial file information as the initial file indicated by it. Then, the dependent file that has a first dependency relationship with the initial file can be determined and obtained. File information such as the file name, file identifier, file size, and file type of the dependent file are regarded as dependent file information, and there are no restrictions on this.
可选地,一些实施例中,还可以从初始编译信息中解析得到文件编译类型,则在获取与初始文件信息所属初始文件存在第一依赖关系的依赖文件信息之前,还可以根据文件编译类型和初始文件信息,确定初始文件,也即是说,支持根据自动化编译需求确定待对文件进行编译操作,该编译操作的具体操作类型(可以被称为文件编译类型),而后,基于该文件编译类型实现针对性地确定初始文件,有效提升初始文件确定的准确率,实现保障编译安全性和完整性的同时,较大程度降低编译所需的资源成本。Optionally, in some embodiments, the file compilation type can also be obtained by parsing the initial compilation information. Then, before obtaining the dependent file information that has a first dependency relationship with the initial file to which the initial file information belongs, the file compilation type and Initial file information determines the initial file, that is to say, it supports determining the compilation operation of the file to be performed according to the automatic compilation requirements, the specific operation type of the compilation operation (can be called the file compilation type), and then, based on the file compilation type Achieve targeted determination of initial files, effectively improve the accuracy of initial file determination, ensure compilation security and integrity, and greatly reduce the resource cost required for compilation.
举例而言,可以根据初始文件信息确定多个候选待编译文件,而后,确定文件编译类型满足指定编译类型的候选编译文件作为初始文件。For example, multiple candidate files to be compiled can be determined based on the initial file information, and then a candidate compiled file whose file compilation type satisfies the specified compilation type is determined as the initial file.
举例而言,可以确定支持该文件编译类型的文件所属的系统模块或者组件,并从系统模块或者组件中包含的文件中筛选出初始文件,对此不做限制。For example, the system module or component to which the file that supports the file compilation type belongs can be determined, and the initial file can be filtered out from the files included in the system module or component, without any limitation.
可选地,一些实施例中,还可以在文件编译类型是删除操作类型时,根据初始文件信息获取删除操作类型所指示的待删除文件作为初始文件,而在文件编译类型是变更操作类型时,根据初始文件信息确定变更操作类型所支持的变更信息内容,并将变更信息内容所属的文件作为初始文件。Optionally, in some embodiments, when the file compilation type is a deletion operation type, the file to be deleted indicated by the deletion operation type can be obtained according to the initial file information as the initial file, and when the file compilation type is a change operation type, Determine the change information content supported by the change operation type based on the initial file information, and use the file to which the change information content belongs as the initial file.
其中,用于对文件进行全部或者局部删除处理的操作,可以被称为删除操作,用于标识删除操作的类型的信息,可以被称为删除操作类型;而用于对文件进行全部或者局部内容修改的操作,可以被称为变更操作,用于标识变更操作的类型的信息,可以被称为变更操作类型;而基于该变更操作类型,确定待进行变更的信息内容,可以被称为变更信息内容,该变更信息内容可以是一个文件中的局部信息内容,则可以将该变更信息内容所属文件直接作为初始文件。Among them, the operation used to delete all or part of the file can be called a deletion operation, and the information used to identify the type of the deletion operation can be called the deletion operation type; and the operation used to delete all or part of the file's contents can be called a deletion operation. The modification operation can be called a change operation, and the information used to identify the type of change operation can be called a change operation type; and based on the change operation type, the information content to be changed can be called change information. Content, the change information content can be partial information content in a file, then the file to which the change information content belongs can be directly used as the initial file.
也即是说,本公开实施例中支持准确地识别出与删除操作类型或者变更操作类型所匹配的初始文件,由于删除操作类型或者变更操作类型均会影响到其他关联依赖文件的编译和运行安全性,由此,当基于与删除操作类型或者变更操作类型所匹配的初始文件确定依赖文件信息时,有效避免在对系统中初始文件进行删除操作或者变更操作时,对其他关联的依赖文件带入影响,能够较大程度提升编译的安全性。That is to say, the embodiment of the present disclosure supports the accurate identification of the initial file that matches the deletion operation type or the change operation type, because the deletion operation type or the change operation type will affect the compilation and operation security of other associated dependent files. Therefore, when the dependent file information is determined based on the initial file that matches the deletion operation type or change operation type, it is effectively avoided that other associated dependent files are brought into the system when the deletion operation or change operation is performed on the initial file in the system. The impact can greatly improve the security of compilation.
S103:根据初始编译信息和依赖文件信息,生成增量编译信息。S103: Generate incremental compilation information based on the initial compilation information and dependent file information.
上述在获取初始编译信息,并从初始编译信息分析得到初始文件信息,获取与初始文件信息指示的 初始文件存在第一依赖关系的依赖文件信息之后,可以处理初始编译信息和依赖文件信息,以生成可以直接被读取、调用的编译信息作为增量编译信息。After the initial compilation information is obtained, the initial file information is obtained from the initial compilation information analysis, and the dependent file information that has a first dependency relationship with the initial file indicated by the initial file information is obtained, the initial compilation information and the dependent file information can be processed to generate Compilation information that can be directly read and called is used as incremental compilation information.
举例而言,假设初始编译信息是初始文件的文件名称,而依赖文件信息是依赖文件的文件名称,则可以基于初始文件的文件名称,获取对初始文件进行编译所需资源信息,并基于依赖文件的文件名称,获取对依赖文件进行编译所需资源信息,而后,根据两部分编译所需资源信息,来生成增量编译信息,由于该增量编译信息能够携带两部分编译所需资源信息,因此,该增量编译信息能够支持自动化的增量编译处理。For example, assuming that the initial compilation information is the file name of the initial file, and the dependent file information is the file name of the dependent file, then the resource information required to compile the initial file can be obtained based on the file name of the initial file, and based on the dependent file file name, obtain the resource information required to compile the dependent file, and then generate incremental compilation information based on the resource information required for the two parts of compilation. Since the incremental compilation information can carry the resource information required for the two parts of compilation, so , this incremental compilation information can support automated incremental compilation processing.
S104:根据增量编译信息进行增量编译处理。S104: Perform incremental compilation processing according to the incremental compilation information.
上述在根据初始编译信息和依赖文件信息,生成增量编译信息之后,可以从增量编译信息中确定编译所需资源信息,而后,基于该编译所需资源信息进行增量编译处理,对此不做限制。After the incremental compilation information is generated based on the initial compilation information and dependent file information, the resource information required for compilation can be determined from the incremental compilation information, and then the incremental compilation process is performed based on the resource information required for compilation. Make restrictions.
本实施例中,通过获取初始编译信息,其中,初始编译信息包括:初始文件信息,并获取与初始文件信息指示的初始文件存在第一依赖关系的依赖文件信息,根据初始编译信息和依赖文件信息,生成增量编译信息,以及根据增量编译信息进行增量编译处理,能够避免增量编译遇到异常,有效提升增量编译的安全性,避免带入大量的编译时间成本,有效提升系统模块的开发效率。In this embodiment, by obtaining initial compilation information, where the initial compilation information includes: initial file information, and obtaining dependent file information that has a first dependency relationship with the initial file indicated by the initial file information, according to the initial compilation information and dependent file information , generate incremental compilation information, and perform incremental compilation processing based on the incremental compilation information, which can avoid incremental compilation encountering exceptions, effectively improve the security of incremental compilation, avoid incurring a large amount of compilation time costs, and effectively improve system modules development efficiency.
图2是本公开另一实施例提出的增量编译处理方法的流程示意图。FIG. 2 is a schematic flowchart of an incremental compilation processing method proposed by another embodiment of the present disclosure.
如图2所示,该增量编译处理方法,包括:As shown in Figure 2, the incremental compilation processing method includes:
S201:获取初始编译信息,其中,初始编译信息包括:初始文件信息。S201: Obtain initial compilation information, where the initial compilation information includes: initial file information.
针对S201的描述说明可以具体参见上述实施例,在此不再赘述。For the description of S201, reference may be made to the above-mentioned embodiments, and details will not be described again here.
S202:获取与初始文件信息对应的模块间依赖信息,其中,模块间依赖信息描述初始文件所属第一系统模块与其他系统模块间的依赖情况。S202: Obtain inter-module dependency information corresponding to the initial file information, where the inter-module dependency information describes the dependency between the first system module to which the initial file belongs and other system modules.
其中,用于描述系统中模块之间相互依赖的信息,可以被称为模块间依赖信息,模块间依赖信息可以具体例如,针对模块A和模块B共享配置文件,针对A的编译变更,会影响模块B的编译运行,则模块A和模块B之间存在依赖关系,模块B依赖于模块A的依赖情况,可以被称为模块间依赖信息。Among them, the information used to describe the interdependence between modules in the system can be called inter-module dependency information. The inter-module dependency information can be specific. For example, for module A and module B sharing configuration files, compilation changes for A will affect When module B is compiled and run, there is a dependency relationship between module A and module B. Module B depends on the dependency of module A, which can be called inter-module dependency information.
本公开实施例的模块间依赖信息,可以是在系统开发过程中,由项目开发人员配置,可以由项目开发人员开发多个模块,并基于不同模块间的调用运行关系,确定存在依赖情况的模块,而后将存在依赖情况的模块记录在依赖配置文件中,以支持增量编译过程中能够快速获得与初始文件信息对应的模块间依赖信息。The inter-module dependency information in the embodiment of the present disclosure can be configured by the project developer during the system development process. The project developer can develop multiple modules and determine the modules with dependencies based on the calling and running relationships between different modules. , and then record the modules with dependencies in the dependency configuration file to support the rapid acquisition of inter-module dependency information corresponding to the initial file information during the incremental compilation process.
其中,与初始文件信息对应的模块间依赖信息,可以是指确定与初始文件所关联的系统模块,将所关联的系统模块的模块间依赖信息,作为与该初始文件信息对应的模块间依赖信息,对此不做限制。The inter-module dependency information corresponding to the initial file information may refer to determining the system module associated with the initial file, and using the inter-module dependency information of the associated system module as the inter-module dependency information corresponding to the initial file information. , there is no restriction on this.
其中,所关联的系统模块,可以是指初始文件所属系统模块,或者是编译运行时依赖于初始文件的系统模块,对此不做限制。Among them, the associated system module may refer to the system module to which the initial file belongs, or a system module that depends on the initial file when compiling and running. There is no limit to this.
S203:获取与初始文件信息对应的共享配置信息,其中,共享配置信息描述初始文件与其他文件之间所共享配置参数的情况。S203: Obtain shared configuration information corresponding to the initial file information, where the shared configuration information describes the configuration parameters shared between the initial file and other files.
其中,配置参数,可以是系统自身硬件的配置参数,也可以是系统运行所需软件的配置参数,对此不做限制。Among them, the configuration parameters may be the configuration parameters of the system's own hardware or the configuration parameters of the software required for system operation, and there is no limit to this.
其中,共享配置参数,是指由初始文件与其他文件共享的配置参数。Among them, shared configuration parameters refer to configuration parameters shared by the initial file and other files.
其中,共享配置参数的参数类型、参数含义、参数名称等信息,可以被称为共享配置信息。Among them, the parameter type, parameter meaning, parameter name and other information of the shared configuration parameters can be called shared configuration information.
本公开实施例的共享配置信息,可以是在系统开发过程中,由项目开发人员配置,可以由项目开发人员开发多个模块,并基于不同文件之间的编译调用关系,确定各个文件与其他文件存在所共享配置参数的情况,而后,对该所共享配置参数的情况进行信息提取,以得到共享配置信息,并将共享配置信息所属的不同文件的信息记录在共享配置文件中,以支持增量编译过程中能够快速获得与初始文件信息对应的共享配置信息。The shared configuration information of this disclosed embodiment can be configured by the project developer during the system development process. The project developer can develop multiple modules and determine the relationship between each file and other files based on the compilation and calling relationships between different files. There are shared configuration parameters, and then the information about the shared configuration parameters is extracted to obtain the shared configuration information, and the information of different files to which the shared configuration information belongs is recorded in the shared configuration file to support increment During the compilation process, the shared configuration information corresponding to the initial file information can be quickly obtained.
S204:根据模块间依赖信息和共享配置信息,获取依赖文件信息。S204: Obtain dependency file information based on inter-module dependency information and shared configuration information.
上述在获取与初始文件信息对应的模块间依赖信息之后,可以确定模块间依赖信息描述的其他系统模块,而后,将其他系统模块所涉及文件的信息作为依赖文件信息,或者,获取与初始文件信息对应的 共享配置信息之后,基于共享配置信息,确定其所描述与初始文件之间共享配置参数的其他文件的信息,作为依赖文件信息,或者,还可以将基于模块间依赖信息和共享配置信息所确定交集部分的文件信息作为依赖文件信息,对此不做限制。After obtaining the inter-module dependency information corresponding to the initial file information above, other system modules described by the inter-module dependency information can be determined, and then, the information about the files involved in other system modules is used as the dependent file information, or the information related to the initial file information is obtained. After corresponding shared configuration information, based on the shared configuration information, determine the information of other files that share configuration parameters between the described and initial files as dependent file information, or you can also use the information based on inter-module dependency information and shared configuration information. The file information of the intersection part is determined as the dependent file information, and there is no restriction on this.
可选地,一些实施例中,为了提升依赖文件识别的全面性和便捷性,还可以根据模块间依赖信息,确定与第一系统模块存在第二依赖关系的第二系统模块,其中,第二系统模块中包括:第一依赖文件,并根据共享配置信息,确定与初始文件之间具有共享配置参数的第二依赖文件,以及根据第一依赖文件的第一依赖文件信息和第二依赖文件的第二依赖文件信息,形成依赖文件信息。Optionally, in some embodiments, in order to improve the comprehensiveness and convenience of identifying dependent files, the second system module that has a second dependency relationship with the first system module can also be determined based on inter-module dependency information, where the second The system module includes: a first dependent file, and determines a second dependent file with shared configuration parameters with the initial file based on the shared configuration information, and determines the first dependent file information and the second dependent file based on the first dependent file. The second dependent file information forms dependent file information.
其中,初始文件所关联的系统模块,可以被称为第一系统模块,而与第一系统模块存在依赖关系的系统模块,可以被称为第二系统模块。The system module associated with the initial file may be called a first system module, and the system module that has a dependency relationship with the first system module may be called a second system module.
其中,不同系统模块之间可能存在各种各样的依赖关系,比如,系统模块A直接与系统模块B相互依赖,则可以确定系统模块A与系统模块B之间的依赖关系是直接依赖关系,而系统模块A间接地与系统模块B相互依赖(比如通过第三方系统模块依赖),则可以确定系统模块A与系统模块B之间的依赖关系是间接依赖关系,或者,系统模块A的编译会影响到系统模块B的编译,反之系统模块B的编译不会影响到系统模块B的编译,则可以确定系统模块A与系统模块B之间的依赖关系是单向依赖关系,而如果系统模块A的编译会影响到系统模块B的编译,反之系统模块B的编译也会影响到系统模块B的编译,则可以确定系统模块A与系统模块B之间的依赖关系是双向依赖关系,对此不做限制。Among them, there may be various dependencies between different system modules. For example, if system module A is directly dependent on system module B, then it can be determined that the dependency between system module A and system module B is a direct dependency. While system module A is indirectly dependent on system module B (for example, through a third-party system module dependency), it can be determined that the dependency between system module A and system module B is an indirect dependency, or the compilation of system module A will Affects the compilation of system module B. On the contrary, the compilation of system module B will not affect the compilation of system module B. It can be determined that the dependency relationship between system module A and system module B is a one-way dependency relationship. If system module A The compilation of system module B will affect the compilation of system module B, and conversely, the compilation of system module B will also affect the compilation of system module B. Then it can be determined that the dependency relationship between system module A and system module B is a two-way dependency relationship. This does not mean Make restrictions.
其中,上述不同系统模块之间依赖关系,可以被称为第二依赖关系。相应的,第二系统模块可能包括多个文件,可以将第二系统模块中所包括的文件均作为第一依赖文件,该第一依赖文件可以被用于后续确定出依赖文件信息。Among them, the dependency relationship between the different system modules mentioned above can be called the second dependency relationship. Correspondingly, the second system module may include multiple files, and the files included in the second system module may be used as first dependent files, and the first dependent files may be used to subsequently determine dependent file information.
其中,基于共享配置信息,确定其所描述的与初始文件之间共享配置参数的其他文件,可以被称为第二依赖文件。Among them, other files that describe shared configuration parameters with the initial file are determined based on the shared configuration information, and may be called second dependent files.
也即是说,本公开实施例中基于模块间依赖信息所确定的依赖文件,即是第一依赖文件,而基于共享配置信息所确定的依赖文件,即是第二依赖文件。That is to say, in the embodiment of the present disclosure, the dependency file determined based on the inter-module dependency information is the first dependency file, and the dependency file determined based on the shared configuration information is the second dependency file.
上述在确定第一依赖文件和第二依赖文件之后,可以根据第一依赖文件的第一依赖文件信息和第二依赖文件的第二依赖文件信息,形成依赖文件信息。After the first dependent file and the second dependent file are determined, dependent file information may be formed based on the first dependent file information of the first dependent file and the second dependent file information of the second dependent file.
可选地,一些实施例中,为了实现基于模块间依赖信息全面地识别出与第一系统模块存在依赖关系的第二系统模块,可以根据模块间依赖信息,确定与第一系统模块存在直接依赖关系的第二系统模块,并根据模块间依赖信息,确定与第一系统模块存在间接依赖关系的第二系统模块,其中,直接依赖关系表示第一系统模块与第一系统模块之间直接依赖,间接依赖关系表示第一系统模块与第二系统模块之间经由第三系统模块间接依赖,直接依赖关系和间接依赖关系被共同作为第二依赖关系。Optionally, in some embodiments, in order to comprehensively identify the second system module that has a dependency relationship with the first system module based on the inter-module dependency information, it may be determined that there is a direct dependency with the first system module based on the inter-module dependency information. The second system module of the relationship, and determines the second system module that has an indirect dependency relationship with the first system module based on the inter-module dependency information, where the direct dependency relationship indicates the direct dependence between the first system module and the first system module, The indirect dependency relationship indicates the indirect dependence between the first system module and the second system module via the third system module, and the direct dependency relationship and the indirect dependency relationship are jointly regarded as the second dependency relationship.
可选地,一些实施例中,为了实现基于共享配置信息快速地,准确地识别出与初始文件存在依赖关系的第二依赖文件,以及便于第二依赖文件信息可以被有效追溯,可以根据共享配置信息,确定与初始文件信息所对应的第二依赖文件信息,并根据第二依赖文件信息,确定第二依赖文件。Optionally, in some embodiments, in order to quickly and accurately identify the second dependent file that has a dependency relationship with the initial file based on the shared configuration information, and so that the second dependent file information can be effectively traced, the shared configuration can be used information, determine the second dependent file information corresponding to the initial file information, and determine the second dependent file based on the second dependent file information.
由于可以基于共享配置信息确定出第二依赖文件信息(例如第二依赖文件的文件名称、文件类型、文件摘要、文件标识等等),则可以支持基于第二依赖文件信息识别确定出全面的第二依赖文件。Since the second dependent file information (such as the file name, file type, file summary, file identification, etc.) of the second dependent file can be determined based on the shared configuration information, it is possible to support the determination of the comprehensive third dependent file based on the identification of the second dependent file information. 2. Dependency files.
可选地,一些实施例中,为了实现基于第二依赖文件信息,准确地、快速地识别出与初始文件存在依赖关系的第二依赖文件,以及提升系统整体增量编译的效率,可以将第二依赖文件信息所属依赖文件直接作为第二依赖文件,并将第二依赖文件信息所属系统模块中的依赖文件作为第二依赖文件,以及将与第二依赖文件信息所属依赖文件存在第三依赖关系的依赖文件作为第二依赖文件。Optionally, in some embodiments, in order to accurately and quickly identify the second dependent file that has a dependency relationship with the initial file based on the second dependent file information, and to improve the efficiency of the overall incremental compilation of the system, the third dependent file can be The dependent file to which the second dependent file information belongs is directly used as the second dependent file, and the dependent file in the system module to which the second dependent file information belongs is used as the second dependent file, and there is a third dependency relationship with the dependent file to which the second dependent file information belongs. The dependent file is used as the second dependent file.
其中,第二依赖文件信息所属依赖文件,是指第二依赖文件信息所直接描述的文件;第二依赖文件信息所属系统模块中的依赖文件,是指第二依赖文件所关联的系统模块中所包含的依赖文件;而第二依赖文件信息所属依赖文件存在第三依赖关系的依赖文件,可以是与第二依赖文件信息所直接描述的文件之间具有共享配置信息的依赖文件,对此不做限制。Among them, the dependent file to which the second dependent file information belongs refers to the file directly described by the second dependent file information; the dependent file in the system module to which the second dependent file information belongs refers to the file in the system module associated with the second dependent file. The dependent file included; while the dependent file to which the second dependent file information belongs has a third dependency relationship, it can be a dependent file with shared configuration information with the file directly described by the second dependent file information, and nothing will be done about this limit.
S205:根据初始编译信息和依赖文件信息,生成增量编译信息。S205: Generate incremental compilation information based on the initial compilation information and dependent file information.
S206:根据增量编译信息进行增量编译处理。S206: Perform incremental compilation processing according to the incremental compilation information.
针对S205-S206的描述说明可以具体参见上述实施例,在此不再赘述。For the description of S205-S206, reference may be made to the above-mentioned embodiments, and details will not be described again here.
本实施例中,通过获取初始编译信息,其中,初始编译信息包括:初始文件信息,并获取与初始文件信息指示的初始文件存在第一依赖关系的依赖文件信息,根据初始编译信息和依赖文件信息,生成增量编译信息,以及根据增量编译信息进行增量编译处理,能够避免增量编译遇到异常,有效提升增量编译的安全性,避免带入大量的编译时间成本,有效提升系统模块的开发效率。通过获取与初始文件信息对应的模块间依赖信息,其中,模块间依赖信息描述初始文件所属第一系统模块与其他系统模块间的依赖情况,并获取与初始文件信息对应的共享配置信息,其中,共享配置信息描述初始文件与其他文件之间所共享配置参数的情况,以及根据模块间依赖信息和共享配置信息,获取依赖文件信息,实现联合模块间的依赖情况和所共享配置参数的情况来确定依赖文件信息,保障系统中依赖情况的识别全面性和准确性,能够最大限度避免增量编译产生异常,全面提升增量编译的安全性。In this embodiment, by obtaining initial compilation information, where the initial compilation information includes: initial file information, and obtaining dependent file information that has a first dependency relationship with the initial file indicated by the initial file information, according to the initial compilation information and dependent file information , generate incremental compilation information, and perform incremental compilation processing based on the incremental compilation information, which can avoid incremental compilation encountering exceptions, effectively improve the security of incremental compilation, avoid incurring a large amount of compilation time costs, and effectively improve system modules development efficiency. By obtaining the inter-module dependency information corresponding to the initial file information, where the inter-module dependency information describes the dependence between the first system module to which the initial file belongs and other system modules, and obtains the shared configuration information corresponding to the initial file information, where, The shared configuration information describes the configuration parameters shared between the initial file and other files, and obtains the dependent file information based on the inter-module dependency information and shared configuration information, and realizes the determination of the dependencies between modules and the shared configuration parameters. Dependence file information ensures the comprehensiveness and accuracy of identification of dependency situations in the system, which can avoid exceptions in incremental compilation to the greatest extent and comprehensively improve the security of incremental compilation.
图3是本公开另一实施例提出的增量编译处理方法的流程示意图。FIG. 3 is a schematic flowchart of an incremental compilation processing method proposed by another embodiment of the present disclosure.
如图3所示,该增量编译处理方法,包括:As shown in Figure 3, the incremental compilation processing method includes:
S301:获取初始编译信息,其中,初始编译信息包括:初始文件信息。S301: Obtain initial compilation information, where the initial compilation information includes: initial file information.
S302:获取与初始文件信息指示的初始文件存在第一依赖关系的依赖文件信息。S302: Obtain dependent file information that has a first dependency relationship with the initial file indicated by the initial file information.
S303:根据初始编译信息和依赖文件信息,生成增量编译信息。S303: Generate incremental compilation information based on the initial compilation information and dependent file information.
针对S301-S303的描述说明可以具体参见上述实施例,在此不再赘述。For the description of S301-S303, reference may be made to the above-mentioned embodiments, and details will not be described again here.
S304:对初始文件信息所属初始文件进行编译处理,得到初始编译文件。S304: Compile the initial file to which the initial file information belongs to obtain an initial compiled file.
其中,对初始文件进行编译处理得到的文件,可以被称为初始编译文件。Among them, the file obtained by compiling the initial file may be called an initial compiled file.
其中,编译,是指利用编译程序从源语言编写的源程序产生目标程序的过程。编译处理过程,可以把高级语言变成计算机可以识别的2进制语言,可以分为五个阶段:词法分析;语法分析;语义检查和中间代码生成;代码优化;目标代码生成。主要部分是进行词法分析和语法分析,又称为源程序分析,分析过程中发现有语法错误,给出提示信息。Among them, compilation refers to the process of using a compiler to generate a target program from a source program written in a source language. The compilation process can turn high-level language into a binary language that can be recognized by computers, and can be divided into five stages: lexical analysis; syntax analysis; semantic inspection and intermediate code generation; code optimization; and target code generation. The main part is to perform lexical analysis and syntax analysis, also known as source program analysis. During the analysis process, grammatical errors are found and prompt information is given.
则初始编译文件可以包括:对初始文件进行词法分析、语法分析后所生成的中间代码文件,以及代码优化后得到的目标代码文件,对此不做限制。Then the initial compiled file can include: the intermediate code file generated after lexical analysis and syntax analysis of the initial file, and the target code file obtained after code optimization, and there is no limit to this.
本公开实施例为了避免已有的编译文件对增量编译过程带入影响,以及已有的编译文件占用过多的资源消耗,还可以在进行增量编译之前,删除第一系统模块中与初始文件对应的历史编译文件,并删除第二系统模块中与依赖文件对应的历史编译文件。In order to avoid the impact of existing compiled files on the incremental compilation process and the existing compiled files occupying excessive resource consumption, the embodiments of the present disclosure may also delete the files in the first system module and the initial ones before incremental compilation. The historical compilation file corresponding to the file, and delete the historical compilation file corresponding to the dependent file in the second system module.
其中,初始文件所属的第一系统模块中已有的编译文件,可以被称为与初始文件对应的历史编译文件,而依赖文件所属的第二系统模块中已有的编译文件,可以被称为与依赖文件对应的历史编译文件。Among them, the existing compiled files in the first system module to which the initial file belongs can be called historical compiled files corresponding to the initial files, and the existing compiled files in the second system module to which the dependent files belong can be called Historical compilation files corresponding to dependent files.
S305:对依赖文件信息所属依赖文件进行编译处理,得到依赖编译文件。S305: Compile the dependency file to which the dependency file information belongs, and obtain the dependency compiled file.
其中,对依赖文件进行编译处理得到的文件,可以被称为依赖编译文件。Among them, the files obtained by compiling the dependent files may be called dependent compiled files.
依赖编译文件可以包括:对依赖文件进行词法分析、语法分析后所生成的中间代码文件,以及代码优化后得到的目标代码文件,对此不做限制。Dependency compiled files can include: intermediate code files generated after lexical analysis and syntax analysis of dependency files, and target code files obtained after code optimization. There is no limit to this.
S306:对初始编译文件所属的第一系统模块进行打包处理,生成模块级的第一文件资源包。S306: Package the first system module to which the initial compiled file belongs, and generate a module-level first file resource package.
其中,在对初始文件信息所属初始文件进行编译处理,得到初始编译文件值之后,由于增量编译已完成,此时第一系统模块已经包含了增量编译后的初始编译文件,则可以对初始编译文件所属的第一系统模块进行打包处理,生成模块级的文件资源包作为第一文件资源包。Among them, after the initial file to which the initial file information belongs is compiled and the initial compiled file value is obtained, since the incremental compilation has been completed and the first system module already contains the incrementally compiled initial compiled file at this time, the initial compiled file can be The first system module to which the compiled file belongs is packaged and a module-level file resource package is generated as the first file resource package.
S307:对依赖编译文件所属的第二系统模块进行打包处理,生成模块级的第二文件资源包。S307: Package the second system module to which the dependent compiled file belongs, and generate a module-level second file resource package.
其中,在对依赖文件信息所属依赖文件进行编译处理,得到依赖编译文件之后,由于增量编译已完成,此时第二系统模块已经包含了增量编译后的依赖编译文件,则可以对依赖编译文件所属的第二系统模块进行打包处理,生成模块级的文件资源包作为第二文件资源包。Among them, after the dependency file to which the dependency file information belongs is compiled and the dependency compilation file is obtained, since the incremental compilation has been completed and the second system module already contains the incrementally compiled dependency compilation file, the dependency compilation can be The second system module to which the file belongs is packaged and a module-level file resource package is generated as the second file resource package.
上述打包处理所得第一文件资源包和第二文件资源包可以被用于构建完整的系统,具体可以参见后续实施例。The first file resource package and the second file resource package obtained by the above packaging process can be used to build a complete system. For details, please refer to subsequent embodiments.
S308:根据第一文件资源包、第二文件资源包,以及第三文件资源包构建目标系统;其中,第三文 件资源包是第三系统模块对应的文件资源包,第三系统模块与第一系统模块和第二系统模块均不存在依赖关系。S308: Build the target system based on the first file resource package, the second file resource package, and the third file resource package; wherein the third file resource package is the file resource package corresponding to the third system module, and the third system module is the same as the first file resource package. There is no dependency relationship between the system module and the second system module.
本公开实施例在根据打包处理所得第一文件资源包和第二文件资源包构建完整的系统时,还可以获取未进行增量编译的第三系统模块的第三文件资源包,该第三系统模块,可以是基于上述方法步骤所确定的不与初始文件存来依赖关系的系统模块,该第三文件资源包可以是在增量编译之前已经编译得到的,则可以直接拉取第三系统模块的第三文件资源包,以支持联合第一文件资源包、第二文件资源包,以及第三文件资源包构建出完整产品系统作为目标系统。When building a complete system based on the first file resource package and the second file resource package obtained by the packaging process, the embodiment of the present disclosure can also obtain the third file resource package of the third system module that has not been incrementally compiled. The third system The module can be a system module that is not dependent on the initial file as determined based on the above method steps. The third file resource package can be compiled before incremental compilation, and the third system module can be directly pulled. The third file resource package supports the combination of the first file resource package, the second file resource package, and the third file resource package to build a complete product system as the target system.
本实施例中,通过获取初始编译信息,其中,初始编译信息包括:初始文件信息,并获取与初始文件信息指示的初始文件存在第一依赖关系的依赖文件信息,根据初始编译信息和依赖文件信息,生成增量编译信息,以及根据增量编译信息进行增量编译处理,能够避免增量编译遇到异常,有效提升增量编译的安全性,避免带入大量的编译时间成本,有效提升系统模块的开发效率。通过对初始文件信息所属初始文件进行编译处理,得到初始编译文件,对依赖文件信息所属依赖文件进行编译处理,得到依赖编译文件,并对初始编译文件所属的第一系统模块进行打包处理,生成模块级的第一文件资源包,以及对依赖编译文件所属的第二系统模块进行打包处理,生成模块级的第二文件资源包,能够有效支持系统级别的模块集成,便于模块级的文件资源信息的存储、调用,以及复用。通过根据第一文件资源包、第二文件资源包,以及第三文件资源包构建目标系统,其中,第三文件资源包是第三系统模块对应的文件资源包,第三系统模块与第一系统模块和第二系统模块均不存在依赖关系,能够在增量编译之后,有效提升目标系统的集成效率,提升目标系统的集成和发布效果。In this embodiment, by obtaining initial compilation information, where the initial compilation information includes: initial file information, and obtaining dependent file information that has a first dependency relationship with the initial file indicated by the initial file information, according to the initial compilation information and dependent file information , generate incremental compilation information, and perform incremental compilation processing based on the incremental compilation information, which can avoid incremental compilation encountering exceptions, effectively improve the security of incremental compilation, avoid incurring a large amount of compilation time costs, and effectively improve system modules development efficiency. By compiling the initial file to which the initial file information belongs, the initial compiled file is obtained, compiling the dependency file to which the dependent file information belongs, obtaining the dependent compiled file, and packaging the first system module to which the initial compiled file belongs to generate a module. The first file resource package at the level, and the second system module to which the dependent compiled file belongs are packaged to generate a second file resource package at the module level, which can effectively support system-level module integration and facilitate module-level file resource information. Store, call, and reuse. The target system is constructed based on the first file resource package, the second file resource package, and the third file resource package, where the third file resource package is the file resource package corresponding to the third system module, and the third system module is the same as the first system module. There is no dependency between the module and the second system module, which can effectively improve the integration efficiency of the target system and improve the integration and release effect of the target system after incremental compilation.
图4是本公开一实施例提出的增量编译处理装置的结构示意图。FIG. 4 is a schematic structural diagram of an incremental compilation processing device proposed by an embodiment of the present disclosure.
如图4所示,该增量编译处理装置40,包括:As shown in Figure 4, the incremental compilation processing device 40 includes:
第一获取模块401,用于获取初始编译信息,其中,初始编译信息包括:初始文件信息;The first acquisition module 401 is used to acquire initial compilation information, where the initial compilation information includes: initial file information;
第二获取模块402,用于获取与初始文件信息指示的初始文件存在第一依赖关系的依赖文件信息;The second acquisition module 402 is used to acquire dependent file information that has a first dependency relationship with the initial file indicated by the initial file information;
生成模块403,用于根据初始编译信息和依赖文件信息,生成增量编译信息;以及The generation module 403 is used to generate incremental compilation information based on the initial compilation information and dependent file information; and
处理模块404,用于根据增量编译信息进行增量编译处理。The processing module 404 is used to perform incremental compilation processing according to the incremental compilation information.
在本公开的一些实施例中,如图5所示,图5是本公开另一实施例提出的增量编译处理装置的结构示意图,初始编译信息还包括:文件编译类型;其中,还包括:In some embodiments of the present disclosure, as shown in Figure 5, which is a schematic structural diagram of an incremental compilation processing device proposed by another embodiment of the present disclosure, the initial compilation information also includes: file compilation type; wherein, it also includes:
确定模块405,用于在获取与初始文件信息所属初始文件存在第一依赖关系的依赖文件信息之前,根据文件编译类型和初始文件信息,确定初始文件。The determination module 405 is configured to determine the initial file according to the file compilation type and the initial file information before obtaining dependent file information that has a first dependency relationship with the initial file to which the initial file information belongs.
在本公开的一些实施例中,其中,确定模块405,具体用于:In some embodiments of the present disclosure, the determining module 405 is specifically used for:
如果文件编译类型是删除操作类型,则根据初始文件信息获取删除操作类型所指示的待删除文件作为初始文件;If the file compilation type is a deletion operation type, the file to be deleted indicated by the deletion operation type is obtained according to the initial file information as the initial file;
如果文件编译类型是变更操作类型,则根据初始文件信息确定变更操作类型所支持的变更信息内容,并将变更信息内容所属的文件作为初始文件。If the file compilation type is a change operation type, the change information content supported by the change operation type is determined based on the initial file information, and the file to which the change information content belongs is used as the initial file.
在本公开的一些实施例中,其中,第二获取模块402,包括:In some embodiments of the present disclosure, the second acquisition module 402 includes:
第一获取子模块4021,用于获取与初始文件信息对应的模块间依赖信息,其中,模块间依赖信息描述初始文件所属第一系统模块与其他系统模块间的依赖情况;The first acquisition sub-module 4021 is used to obtain inter-module dependency information corresponding to the initial file information, where the inter-module dependency information describes the dependency between the first system module to which the initial file belongs and other system modules;
第二获取子模块4022,用于获取与初始文件信息对应的共享配置信息,其中,共享配置信息描述初始文件与其他文件之间所共享配置参数的情况;The second acquisition sub-module 4022 is used to acquire the shared configuration information corresponding to the initial file information, where the shared configuration information describes the configuration parameters shared between the initial file and other files;
第三获取子模块4023,用于根据模块间依赖信息和共享配置信息,获取依赖文件信息。The third acquisition sub-module 4023 is used to acquire dependent file information based on inter-module dependency information and shared configuration information.
在本公开的一些实施例中,其中,第三获取子模块4023,具体用于:In some embodiments of the present disclosure, the third acquisition sub-module 4023 is specifically used for:
根据模块间依赖信息,确定与第一系统模块存在第二依赖关系的第二系统模块,其中,第二系统模块中包括:第一依赖文件;Determine a second system module that has a second dependency relationship with the first system module according to the inter-module dependency information, where the second system module includes: a first dependency file;
根据共享配置信息,确定与初始文件之间具有共享配置参数的第二依赖文件;According to the shared configuration information, determine a second dependent file that has shared configuration parameters with the initial file;
根据第一依赖文件的第一依赖文件信息和第二依赖文件的第二依赖文件信息,形成依赖文件信息。Dependent file information is formed based on the first dependent file information of the first dependent file and the second dependent file information of the second dependent file.
在本公开的一些实施例中,其中,第三获取子模块4023,还用于:In some embodiments of the present disclosure, the third acquisition sub-module 4023 is also used for:
根据模块间依赖信息,确定与第一系统模块存在直接依赖关系的第二系统模块;According to inter-module dependency information, determine the second system module that has a direct dependency relationship with the first system module;
根据模块间依赖信息,确定与第一系统模块存在间接依赖关系的第二系统模块;Determine the second system module that has an indirect dependency relationship with the first system module according to the inter-module dependency information;
其中,直接依赖关系表示第一系统模块与第一系统模块之间直接依赖,间接依赖关系表示第一系统模块与第二系统模块之间经由第三系统模块间接依赖,直接依赖关系和间接依赖关系被共同作为第二依赖关系。Among them, the direct dependency relationship represents the direct dependence between the first system module and the first system module, the indirect dependency relationship represents the indirect dependence between the first system module and the second system module via the third system module, the direct dependency relationship and the indirect dependency relationship. is shared as a secondary dependency.
在本公开的一些实施例中,其中,第三获取子模块4023,还用于:In some embodiments of the present disclosure, the third acquisition sub-module 4023 is also used for:
根据共享配置信息,确定与初始文件信息所对应的第二依赖文件信息;Determine the second dependent file information corresponding to the initial file information according to the shared configuration information;
根据第二依赖文件信息,确定第二依赖文件。Determine the second dependent file based on the second dependent file information.
在本公开的一些实施例中,其中,第三获取子模块4023,还用于:In some embodiments of the present disclosure, the third acquisition sub-module 4023 is also used for:
将第二依赖文件信息所属依赖文件作为第二依赖文件;Use the dependent file to which the second dependent file information belongs as the second dependent file;
将第二依赖文件信息所属系统模块中的依赖文件作为第二依赖文件;Use the dependent file in the system module to which the second dependent file information belongs as the second dependent file;
将与第二依赖文件信息所属依赖文件存在第三依赖关系的依赖文件作为第二依赖文件。The dependent file that has a third dependency relationship with the dependent file to which the second dependent file information belongs is used as the second dependent file.
在本公开的一些实施例中,其中,处理模块404,具体用于:In some embodiments of the present disclosure, the processing module 404 is specifically used to:
对初始文件信息所属初始文件进行编译处理,得到初始编译文件;Compile the initial file to which the initial file information belongs to obtain the initial compiled file;
对依赖文件信息所属依赖文件进行编译处理,得到依赖编译文件;Compile the dependency file to which the dependency file information belongs, and obtain the dependency compiled file;
对初始编译文件所属的第一系统模块进行打包处理,生成模块级的第一文件资源包;Package the first system module to which the initial compiled file belongs and generate a module-level first file resource package;
对依赖编译文件所属的第二系统模块进行打包处理,生成模块级的第二文件资源包。Package the second system module to which the dependent compiled file belongs to generate a module-level second file resource package.
在本公开的一些实施例中,其中,处理模块404,还用于:In some embodiments of the present disclosure, the processing module 404 is also used to:
删除第一系统模块中与初始文件对应的历史编译文件;Delete the historical compilation file corresponding to the initial file in the first system module;
删除第二系统模块中与依赖文件对应的历史编译文件。Delete the historical compilation files corresponding to the dependent files in the second system module.
在本公开的一些实施例中,其中,处理模块404,还用于:In some embodiments of the present disclosure, the processing module 404 is also used to:
根据第一文件资源包、第二文件资源包,以及第三文件资源包构建目标系统;Build the target system based on the first file resource package, the second file resource package, and the third file resource package;
其中,第三文件资源包是第三系统模块对应的文件资源包,第三系统模块与第一系统模块和第二系统模块均不存在依赖关系。Among them, the third file resource package is the file resource package corresponding to the third system module, and the third system module has no dependency relationship with either the first system module or the second system module.
与上述图1至图3实施例提供的增量编译处理方法相对应,本公开还提供一种增量编译处理装置,由于本公开实施例提供的增量编译处理装置与上述图1至图3实施例提供的增量编译处理方法相对应,因此在增量编译处理方法的实施方式也适用于本公开实施例提供的增量编译处理装置,在本公开实施例中不再详细描述。Corresponding to the incremental compilation processing method provided by the above-mentioned embodiments of FIGS. 1 to 3 , the present disclosure also provides an incremental compilation processing device. The incremental compilation processing method provided by the embodiment corresponds to the incremental compilation processing method. Therefore, the implementation of the incremental compilation processing method is also applicable to the incremental compilation processing device provided by the embodiment of the present disclosure, and will not be described in detail in the embodiment of the present disclosure.
本实施例中,通过获取初始编译信息,其中,初始编译信息包括:初始文件信息,获取与初始文件信息指示的初始文件存在第一依赖关系的依赖文件信息,根据初始编译信息和依赖文件信息,生成增量编译信息,以及根据增量编译信息进行增量编译处理,能够避免增量编译遇到异常,有效提升增量编译的安全性,避免带入大量的编译时间成本,有效提升系统模块的开发效率。In this embodiment, by obtaining initial compilation information, where the initial compilation information includes: initial file information, and obtaining dependent file information that has a first dependency relationship with the initial file indicated by the initial file information, according to the initial compilation information and dependent file information, Generating incremental compilation information and performing incremental compilation processing based on the incremental compilation information can avoid incremental compilation encountering exceptions, effectively improve the security of incremental compilation, avoid incurring a large amount of compilation time costs, and effectively improve the performance of system modules. Development efficiency.
为了实现上述实施例,本公开还提出一种电子设备,包括:存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,处理器执行程序时,实现如本公开前述实施例提出的增量编译处理方法。In order to implement the above embodiments, the present disclosure also proposes an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the aforementioned embodiments of the present disclosure are implemented. The proposed incremental compilation processing method.
为了实现上述实施例,本公开还提出一种非临时性计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如本公开前述实施例提出的增量编译处理方法。In order to implement the above embodiments, the present disclosure also proposes a non-transitory computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the incremental compilation processing method as proposed in the previous embodiments of the present disclosure is implemented.
为了实现上述实施例,本公开还提出一种计算机程序产品,当计算机程序产品中的指令处理器执行时,执行如本公开前述实施例提出的增量编译处理方法。In order to implement the above embodiments, the present disclosure also proposes a computer program product. When the instruction processor in the computer program product is executed, the incremental compilation processing method proposed in the previous embodiments of the present disclosure is executed.
图6示出了适于用来实现本公开实施方式的示例性电子设备的框图。图6显示的电子设备12仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。6 illustrates a block diagram of an exemplary electronic device suitable for implementing embodiments of the present disclosure. The electronic device 12 shown in FIG. 6 is only an example and should not bring any limitations to the functions and scope of use of the embodiments of the present disclosure.
如图6所示,电子设备12以通用计算设备的形式表现。电子设备12的组件可以包括但不限于:一个或者多个处理器或者处理单元16,系统存储器28,连接不同系统组件(包括系统存储器28和处理单元16)的总线18。As shown in Figure 6, electronic device 12 is embodied in the form of a general computing device. Components of electronic device 12 may include, but are not limited to: one or more processors or processing units 16, system memory 28, and a bus 18 connecting various system components (including system memory 28 and processing unit 16).
总线18表示几类总线结构中的一种或多种,包括存储器总线或者存储器控制器,外围总线,图形加速端口,处理器或者使用多种总线结构中的任意总线结构的局域总线。举例来说,这些体系结构包括 但不限于工业标准体系结构(Industry Standard Architecture;以下简称:ISA)总线,微通道体系结构(Micro Channel Architecture;以下简称:MAC)总线,增强型ISA总线、视频电子标准协会(Video Electronics Standards Association;以下简称:VESA)局域总线以及外围组件互连(Peripheral Component Interconnection;以下简称:PCI)总线。 Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics accelerated port, a processor, or a local bus using any of a variety of bus structures. For example, these architectures include but are not limited to Industry Standard Architecture (hereinafter referred to as: ISA) bus, Micro Channel Architecture (Micro Channel Architecture; hereafter referred to as: MAC) bus, enhanced ISA bus, video electronics Standards Association (Video Electronics Standards Association; hereinafter referred to as: VESA) local bus and Peripheral Component Interconnection (hereinafter referred to as: PCI) bus.
电子设备12典型地包括多种计算机系统可读介质。这些介质可以是任何能够被电子设备12访问的可用介质,包括易失性和非易失性介质,可移动的和不可移动的介质。 Electronic device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by electronic device 12, including volatile and nonvolatile media, removable and non-removable media.
存储器28可以包括易失性存储器形式的计算机系统可读介质,例如随机存取存储器(Random Access Memory;以下简称:RAM)30和/或高速缓存存储器32。电子设备12可以进一步包括其它可移动/不可移动的、易失性/非易失性计算机系统存储介质。仅作为举例,存储系统34可以用于读写不可移动的、非易失性磁介质(图6未显示,通常称为“硬盘驱动器”)。The memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (Random Access Memory; hereinafter referred to as: RAM) 30 and/or cache memory 32. Electronic device 12 may further include other removable/non-removable, volatile/non-volatile computer system storage media. By way of example only, storage system 34 may be used to read and write to non-removable, non-volatile magnetic media (not shown in Figure 6, commonly referred to as a "hard drive").
尽管图6中未示出,可以提供用于对可移动非易失性磁盘(例如“软盘”)读写的磁盘驱动器,以及对可移动非易失性光盘(例如:光盘只读存储器(Compact Disc Read Only Memory;以下简称:CD-ROM)、数字多功能只读光盘(Digital Video Disc Read Only Memory;以下简称:DVD-ROM)或者其它光介质)读写的光盘驱动器。在这些情况下,每个驱动器可以通过一个或者多个数据介质接口与总线18相连。存储器28可以包括至少一个程序产品,该程序产品具有一组(例如至少一个)程序模块,这些程序模块被配置以执行本公开各实施例的功能。Although not shown in FIG. 6, a disk drive may be provided for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and a disk drive for reading and writing a removable non-volatile optical disk (e.g., a compact disk read-only memory). Disc Read Only Memory (hereinafter referred to as: CD-ROM), Digital Video Disc Read Only Memory (hereinafter referred to as: DVD-ROM) or other optical media) read and write optical disc drives. In these cases, each drive may be connected to bus 18 through one or more data media interfaces. Memory 28 may include at least one program product having a set (eg, at least one) of program modules configured to perform the functions of embodiments of the present disclosure.
具有一组(至少一个)程序模块42的程序/实用工具40,可以存储在例如存储器28中,这样的程序模块42包括但不限于操作系统、一个或者多个应用程序、其它程序模块以及程序数据,这些示例中的每一个或某种组合中可能包括网络环境的实现。程序模块42通常执行本公开所描述的实施例中的功能和/或方法。A program/utility 40 having a set of (at least one) program modules 42, including but not limited to an operating system, one or more application programs, other program modules, and program data, may be stored, for example, in memory 28 , each of these examples or some combination may include the implementation of a network environment. Program modules 42 generally perform functions and/or methods in the embodiments described in this disclosure.
电子设备12也可以与一个或多个外部设备14(例如键盘、指向设备、显示器24等)通信,还可与一个或者多个使得用户能与该电子设备12交互的设备通信,和/或与使得该电子设备12能与一个或多个其它计算设备进行通信的任何设备(例如网卡,调制解调器等等)通信。这种通信可以通过输入/输出(I/O)接口22进行。并且,电子设备12还可以通过网络适配器20与一个或者多个网络(例如局域网(Local Area Network;以下简称:LAN),广域网(Wide Area Network;以下简称:WAN)和/或公共网络,例如因特网)通信。如图所示,网络适配器20通过总线18与电子设备12的其它模块通信。应当明白,尽管图中未示出,可以结合电子设备12使用其它硬件和/或软件模块,包括但不限于:微代码、设备驱动器、冗余处理单元、外部磁盘驱动阵列、RAID系统、磁带驱动器以及数据备份存储系统等。 Electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), may also communicate with one or more devices that enable a user to interact with electronic device 12, and/or with Any device (eg, network card, modem, etc.) that enables the electronic device 12 to communicate with one or more other computing devices. This communication may occur through input/output (I/O) interface 22. Moreover, the electronic device 12 can also communicate with one or more networks (such as a local area network (Local Area Network; hereinafter referred to as: LAN), a wide area network (Wide Area Network; hereinafter referred to as: WAN)) and/or a public network, such as the Internet, through the network adapter 20 ) communication. As shown, network adapter 20 communicates with other modules of electronic device 12 via bus 18 . It should be understood that, although not shown in the figures, other hardware and/or software modules may be used in conjunction with electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives And data backup storage system, etc.
处理单元16通过运行存储在系统存储器28中的程序,从而执行各种功能应用以及数据处理,例如实现前述实施例中提及的增量编译处理方法。The processing unit 16 executes programs stored in the system memory 28 to perform various functional applications and data processing, such as implementing the incremental compilation processing method mentioned in the previous embodiment.
本领域技术人员在考虑说明书及实践这里公开的公开后,将容易想到本公开的其它实施方案。本公开旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由下面的权利要求指出。Other embodiments of the disclosure will be readily apparent to those skilled in the art from consideration of the specification and practice of the disclosure herein. The present disclosure is intended to cover any variations, uses, or adaptations of the disclosure that follow the general principles of the disclosure and include common common sense or customary technical means in the technical field that are not disclosed in the disclosure. . It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限制。It is to be understood that the present disclosure is not limited to the precise structures described above and illustrated in the accompanying drawings, and various modifications and changes may be made without departing from the scope thereof. The scope of the disclosure is limited only by the appended claims.
需要说明的是,在本公开的描述中,术语“第一”、“第二”等仅用于描述目的,而不能理解为指示或暗示相对重要性。此外,在本公开的描述中,除非另有说明,“多个”的含义是两个或两个以上。It should be noted that in the description of the present disclosure, the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. Furthermore, in the description of the present disclosure, "plurality" means two or more unless otherwise specified.
流程图中或在此以其他方式描述的任何过程或方法描述可以被理解为,表示包括一个或更多个用于实现特定逻辑功能或过程的步骤的可执行指令的代码的模块、片段或部分,并且本公开的优选实施方式的范围包括另外的实现,其中可以不按所示出或讨论的顺序,包括根据所涉及的功能按基本同时的方式或按相反的顺序,来执行功能,这应被本公开的实施例所属技术领域的技术人员所理解。Any process or method descriptions in flowcharts or otherwise described herein may be understood to represent modules, segments, or portions of code that include one or more executable instructions for implementing the specified logical functions or steps of the process. , and the scope of the preferred embodiments of the present disclosure includes additional implementations in which functions may be performed out of the order shown or discussed, including in a substantially simultaneous manner or in the reverse order, depending on the functionality involved, which shall It should be understood by those skilled in the art to which embodiments of the present disclosure belong.
应当理解,本公开的各部分可以用硬件、软件、固件或它们的组合来实现。在上述实施方式中,多个步骤或方法可以用存储在存储器中且由合适的指令执行系统执行的软件或固件来实现。例如,如果用 硬件来实现,和在另一实施方式中一样,可用本领域公知的下列技术中的任一项或他们的组合来实现:具有用于对数据信号实现逻辑功能的逻辑门电路的离散逻辑电路,具有合适的组合逻辑门电路的专用集成电路,可编程门阵列(PGA),现场可编程门阵列(FPGA)等。It should be understood that various parts of the present disclosure may be implemented in hardware, software, firmware, or combinations thereof. In the above embodiments, various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if it is implemented in hardware, as in another embodiment, it can be implemented by any one or a combination of the following technologies known in the art: a logic gate circuit with a logic gate circuit for implementing a logic function on a data signal. Discrete logic circuits, application specific integrated circuits with suitable combinational logic gates, programmable gate arrays (PGA), field programmable gate arrays (FPGA), etc.
本技术领域的普通技术人员可以理解实现上述实施例方法携带的全部或部分步骤是可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,该程序在执行时,包括方法实施例的步骤之一或其组合。Those of ordinary skill in the art can understand that all or part of the steps involved in implementing the methods of the above embodiments can be completed by instructing relevant hardware through a program. The program can be stored in a computer-readable storage medium. The program can be stored in a computer-readable storage medium. When executed, one of the steps of the method embodiment or a combination thereof is included.
此外,在本公开各个实施例中的各功能单元可以集成在一个处理模块中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。In addition, each functional unit in various embodiments of the present disclosure may be integrated into one processing module, each unit may exist physically alone, or two or more units may be integrated into one module. The above integrated modules can be implemented in the form of hardware or software function modules. If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
上述提到的存储介质可以是只读存储器,磁盘或光盘等。The storage media mentioned above can be read-only memory, magnetic disks or optical disks, etc.
在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本公开的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不一定指的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任何的一个或多个实施例或示例中以合适的方式结合。In the description of this specification, reference to the terms "one embodiment," "some embodiments," "an example," "specific examples," or "some examples" or the like means that specific features are described in connection with the embodiment or example. , structures, materials, or features are included in at least one embodiment or example of the present disclosure. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
尽管上面已经示出和描述了本公开的实施例,可以理解的是,上述实施例是示例性的,不能理解为对本公开的限制,本领域的普通技术人员在本公开的范围内可以对上述实施例进行变化、修改、替换和变型。Although the embodiments of the present disclosure have been shown and described above, it can be understood that the above-mentioned embodiments are illustrative and should not be construed as limitations of the present disclosure. Those of ordinary skill in the art can make modifications to the above-mentioned embodiments within the scope of the present disclosure. The embodiments are subject to changes, modifications, substitutions and variations.

Claims (24)

  1. 一种增量编译处理方法,其特征在于,包括:An incremental compilation processing method, characterized by including:
    获取初始编译信息,其中,所述初始编译信息包括:初始文件信息;Obtain initial compilation information, wherein the initial compilation information includes: initial file information;
    获取与所述初始文件信息指示的初始文件存在第一依赖关系的依赖文件信息;Obtain dependent file information that has a first dependency relationship with the initial file indicated by the initial file information;
    根据所述初始编译信息和所述依赖文件信息,生成增量编译信息;以及Generate incremental compilation information according to the initial compilation information and the dependent file information; and
    根据所述增量编译信息进行增量编译处理。Perform incremental compilation processing according to the incremental compilation information.
  2. 如权利要求1所述的方法,其特征在于,所述初始编译信息还包括:文件编译类型;其中,在所述获取与所述初始文件信息所属初始文件存在第一依赖关系的依赖文件信息之前,还包括:The method of claim 1, wherein the initial compilation information further includes: file compilation type; wherein, before obtaining the dependent file information that has a first dependency relationship with the initial file to which the initial file information belongs, ,Also includes:
    根据所述文件编译类型和所述初始文件信息,确定所述初始文件。The initial file is determined according to the file compilation type and the initial file information.
  3. 如权利要求2所述的方法,其特征在于,所述根据所述文件编译类型和所述初始文件信息,确定所述初始文件,包括:The method of claim 2, wherein determining the initial file based on the file compilation type and the initial file information includes:
    如果所述文件编译类型是删除操作类型,则根据所述初始文件信息获取所述删除操作类型所指示的待删除文件作为所述初始文件;If the file compilation type is a deletion operation type, obtain the file to be deleted indicated by the deletion operation type as the initial file according to the initial file information;
    如果所述文件编译类型是变更操作类型,则根据所述初始文件信息确定所述变更操作类型所支持的变更信息内容,并将所述变更信息内容所属的文件作为所述初始文件。If the file compilation type is a change operation type, the change information content supported by the change operation type is determined based on the initial file information, and the file to which the change information content belongs is used as the initial file.
  4. 如权利要求1所述的方法,其特征在于,所述获取与所述初始文件信息指示的初始文件存在第一依赖关系的依赖文件信息,包括:The method of claim 1, wherein the obtaining dependent file information that has a first dependency relationship with the initial file indicated by the initial file information includes:
    获取与所述初始文件信息对应的模块间依赖信息,其中,所述模块间依赖信息描述所述初始文件所属第一系统模块与其他系统模块间的依赖情况;Obtain inter-module dependency information corresponding to the initial file information, wherein the inter-module dependency information describes the dependency between the first system module to which the initial file belongs and other system modules;
    获取与所述初始文件信息对应的共享配置信息,其中,所述共享配置信息描述所述初始文件与其他文件之间所共享配置参数的情况;Obtain shared configuration information corresponding to the initial file information, wherein the shared configuration information describes the configuration parameters shared between the initial file and other files;
    根据所述模块间依赖信息和所述共享配置信息,获取所述依赖文件信息。The dependency file information is obtained according to the inter-module dependency information and the shared configuration information.
  5. 如权利要求4所述的方法,其特征在于,所述根据所述模块间依赖信息和所述共享配置信息,获取所述依赖文件信息,包括:The method of claim 4, wherein obtaining the dependent file information based on the inter-module dependency information and the shared configuration information includes:
    根据所述模块间依赖信息,确定与所述第一系统模块存在第二依赖关系的第二系统模块,其中,所述第二系统模块中包括:第一依赖文件;According to the inter-module dependency information, determine a second system module that has a second dependency relationship with the first system module, wherein the second system module includes: a first dependency file;
    根据所述共享配置信息,确定与所述初始文件之间具有所述共享配置参数的第二依赖文件;According to the shared configuration information, determine a second dependent file that has the shared configuration parameters between the initial file and the initial file;
    根据所述第一依赖文件的第一依赖文件信息和所述第二依赖文件的第二依赖文件信息,形成所述依赖文件信息。The dependent file information is formed based on the first dependent file information of the first dependent file and the second dependent file information of the second dependent file.
  6. 如权利要求5所述的方法,其特征在于,所述根据所述模块间依赖信息,确定与所述第一系统模块存在第二依赖关系的第二系统模块,包括:The method of claim 5, wherein determining, based on the inter-module dependency information, a second system module that has a second dependency relationship with the first system module includes:
    根据所述模块间依赖信息,确定与所述第一系统模块存在直接依赖关系的第二系统模块;Determine a second system module that has a direct dependency relationship with the first system module according to the inter-module dependency information;
    根据所述模块间依赖信息,确定与所述第一系统模块存在间接依赖关系的第二系统模块;Determine a second system module that has an indirect dependency relationship with the first system module according to the inter-module dependency information;
    其中,所述直接依赖关系表示所述第一系统模块与所述第一系统模块之间直接依赖,所述间接依赖关系表示所述第一系统模块与所述第二系统模块之间经由第三系统模块间接依赖,所述直接依赖关系和所述间接依赖关系被共同作为所述第二依赖关系。Wherein, the direct dependency relationship represents the direct dependence between the first system module and the first system module, and the indirect dependency relationship represents the direct dependence between the first system module and the second system module via a third system module. System modules are indirectly dependent, and the direct dependency relationship and the indirect dependency relationship are jointly used as the second dependency relationship.
  7. 如权利要求5所述的方法,其特征在于,所述根据所述共享配置信息,确定与所述初始文件之间具有所述共享配置参数的第二依赖文件,包括:The method of claim 5, wherein determining, based on the shared configuration information, a second dependent file with the shared configuration parameters between the initial file and the initial file includes:
    根据所述共享配置信息,确定与所述初始文件信息所对应的第二依赖文件信息;Determine second dependent file information corresponding to the initial file information according to the shared configuration information;
    根据所述第二依赖文件信息,确定所述第二依赖文件。The second dependent file is determined according to the second dependent file information.
  8. 如权利要求7所述的方法,其特征在于,所述根据所述第二依赖文件信息,确定所述第二依赖文件,包括:The method of claim 7, wherein determining the second dependent file based on the second dependent file information includes:
    将所述第二依赖文件信息所属依赖文件作为所述第二依赖文件;Use the dependent file to which the second dependent file information belongs as the second dependent file;
    将所述第二依赖文件信息所属系统模块中的依赖文件作为所述第二依赖文件;Use the dependent file in the system module to which the second dependent file information belongs as the second dependent file;
    将与所述第二依赖文件信息所属依赖文件存在第三依赖关系的依赖文件作为所述第二依赖文件。The dependency file that has a third dependency relationship with the dependency file to which the second dependency file information belongs is used as the second dependency file.
  9. 如权利要求1所述的方法,其特征在于,所述根据所述增量编译信息进行增量编译处理,包括:The method of claim 1, wherein performing incremental compilation processing according to the incremental compilation information includes:
    对所述初始文件信息所属初始文件进行编译处理,得到初始编译文件;Compile the initial file to which the initial file information belongs to obtain an initial compiled file;
    对所述依赖文件信息所属依赖文件进行编译处理,得到依赖编译文件;Compile the dependency file to which the dependency file information belongs to obtain a dependency compiled file;
    对所述初始编译文件所属的第一系统模块进行打包处理,生成模块级的第一文件资源包;Perform packaging processing on the first system module to which the initial compiled file belongs, and generate a module-level first file resource package;
    对所述依赖编译文件所属的第二系统模块进行打包处理,生成模块级的第二文件资源包。The second system module to which the dependency compiled file belongs is packaged to generate a module-level second file resource package.
  10. 如权利要求9所述的方法,其特征在于,所述根据所述增量编译信息进行增量编译处理,还包括:The method of claim 9, wherein performing incremental compilation processing based on the incremental compilation information further includes:
    删除所述第一系统模块中与所述初始文件对应的历史编译文件;Delete the historical compilation file corresponding to the initial file in the first system module;
    删除所述第二系统模块中与所述依赖文件对应的历史编译文件。Delete historical compilation files corresponding to the dependent files in the second system module.
  11. 如权利要求9所述的方法,其特征在于,所述根据所述增量编译信息进行增量编译处理,还包括:The method of claim 9, wherein performing incremental compilation processing based on the incremental compilation information further includes:
    根据所述第一文件资源包、所述第二文件资源包,以及第三文件资源包构建目标系统;Build a target system based on the first file resource package, the second file resource package, and the third file resource package;
    其中,所述第三文件资源包是第三系统模块对应的文件资源包,所述第三系统模块与所述第一系统模块和所述第二系统模块均不存在依赖关系。Wherein, the third file resource package is a file resource package corresponding to a third system module, and the third system module has no dependency relationship with either the first system module or the second system module.
  12. 一种增量编译处理装置,其特征在于,包括:An incremental compilation processing device, characterized by including:
    第一获取模块,用于获取初始编译信息,其中,所述初始编译信息包括:初始文件信息;The first acquisition module is used to acquire initial compilation information, where the initial compilation information includes: initial file information;
    第二获取模块,用于获取与所述初始文件信息指示的初始文件存在第一依赖关系的依赖文件信息;a second acquisition module, configured to acquire dependent file information that has a first dependency relationship with the initial file indicated by the initial file information;
    生成模块,用于根据所述初始编译信息和所述依赖文件信息,生成增量编译信息;以及A generation module, configured to generate incremental compilation information based on the initial compilation information and the dependent file information; and
    处理模块,用于根据所述增量编译信息进行增量编译处理。A processing module, configured to perform incremental compilation processing according to the incremental compilation information.
  13. 如权利要求12所述的装置,其特征在于,所述初始编译信息还包括:文件编译类型;其中,还包括:The device of claim 12, wherein the initial compilation information further includes: file compilation type; wherein, it further includes:
    确定模块,用于在所述获取与所述初始文件信息所属初始文件存在第一依赖关系的依赖文件信息之前,根据所述文件编译类型和所述初始文件信息,确定所述初始文件。A determination module, configured to determine the initial file according to the file compilation type and the initial file information before obtaining dependent file information that has a first dependency relationship with the initial file to which the initial file information belongs.
  14. 如权利要求13所述的装置,其特征在于,所述确定模块,具体用于:The device according to claim 13, characterized in that the determining module is specifically used to:
    如果所述文件编译类型是删除操作类型,则根据所述初始文件信息获取所述删除操作类型所指示的待删除文件作为所述初始文件;If the file compilation type is a deletion operation type, obtain the file to be deleted indicated by the deletion operation type as the initial file according to the initial file information;
    如果所述文件编译类型是变更操作类型,则根据所述初始文件信息确定所述变更操作类型所支持的变更信息内容,并将所述变更信息内容所属的文件作为所述初始文件。If the file compilation type is a change operation type, the change information content supported by the change operation type is determined based on the initial file information, and the file to which the change information content belongs is used as the initial file.
  15. 如权利要求12所述的装置,其特征在于,所述第二获取模块,包括:The device of claim 12, wherein the second acquisition module includes:
    第一获取子模块,用于获取与所述初始文件信息对应的模块间依赖信息,其中,所述模块间依赖信息描述所述初始文件所属第一系统模块与其他系统模块间的依赖情况;The first acquisition sub-module is used to acquire inter-module dependency information corresponding to the initial file information, wherein the inter-module dependency information describes the dependency between the first system module to which the initial file belongs and other system modules;
    第二获取子模块,用于获取与所述初始文件信息对应的共享配置信息,其中,所述共享配置信息描述所述初始文件与其他文件之间所共享配置参数的情况;The second acquisition sub-module is used to acquire shared configuration information corresponding to the initial file information, where the shared configuration information describes the configuration parameters shared between the initial file and other files;
    第三获取子模块,用于根据所述模块间依赖信息和所述共享配置信息,获取所述依赖文件信息。The third acquisition sub-module is used to acquire the dependent file information according to the inter-module dependency information and the shared configuration information.
  16. 如权利要求15所述的装置,其特征在于,所述第三获取子模块,具体用于:The device according to claim 15, characterized in that the third acquisition sub-module is specifically used for:
    根据所述模块间依赖信息,确定与所述第一系统模块存在第二依赖关系的第二系统模块,其中,所述第二系统模块中包括:第一依赖文件;According to the inter-module dependency information, determine a second system module that has a second dependency relationship with the first system module, wherein the second system module includes: a first dependency file;
    根据所述共享配置信息,确定与所述初始文件之间具有所述共享配置参数的第二依赖文件;According to the shared configuration information, determine a second dependent file that has the shared configuration parameters between the initial file and the initial file;
    根据所述第一依赖文件的第一依赖文件信息和所述第二依赖文件的第二依赖文件信息,形成所述依赖文件信息。The dependent file information is formed based on the first dependent file information of the first dependent file and the second dependent file information of the second dependent file.
  17. 如权利要求16所述的装置,其特征在于,所述第三获取子模块,还用于:The device according to claim 16, characterized in that the third acquisition sub-module is also used to:
    根据所述模块间依赖信息,确定与所述第一系统模块存在直接依赖关系的第二系统模块;Determine a second system module that has a direct dependency relationship with the first system module according to the inter-module dependency information;
    根据所述模块间依赖信息,确定与所述第一系统模块存在间接依赖关系的第二系统模块;Determine a second system module that has an indirect dependency relationship with the first system module according to the inter-module dependency information;
    其中,所述直接依赖关系表示所述第一系统模块与所述第一系统模块之间直接依赖,所述间接依赖关系表示所述第一系统模块与所述第二系统模块之间经由第三系统模块间接依赖,所述直接依赖关系和所述间接依赖关系被共同作为所述第二依赖关系。Wherein, the direct dependency relationship represents the direct dependence between the first system module and the first system module, and the indirect dependency relationship represents the direct dependence between the first system module and the second system module via a third system module. System modules are indirectly dependent, and the direct dependency relationship and the indirect dependency relationship are jointly used as the second dependency relationship.
  18. 如权利要求16所述的装置,其特征在于,所述所述第三获取子模块,还用于:The device according to claim 16, characterized in that the third acquisition sub-module is also used to:
    根据所述共享配置信息,确定与所述初始文件信息所对应的第二依赖文件信息;Determine second dependent file information corresponding to the initial file information according to the shared configuration information;
    根据所述第二依赖文件信息,确定所述第二依赖文件。The second dependent file is determined according to the second dependent file information.
  19. 如权利要求18所述的装置,其特征在于,所述所述第三获取子模块,还用于:The device according to claim 18, characterized in that the third acquisition sub-module is also used to:
    将所述第二依赖文件信息所属依赖文件作为所述第二依赖文件;Use the dependent file to which the second dependent file information belongs as the second dependent file;
    将所述第二依赖文件信息所属系统模块中的依赖文件作为所述第二依赖文件;Use the dependent file in the system module to which the second dependent file information belongs as the second dependent file;
    将与所述第二依赖文件信息所属依赖文件存在第三依赖关系的依赖文件作为所述第二依赖文件。The dependency file that has a third dependency relationship with the dependency file to which the second dependency file information belongs is used as the second dependency file.
  20. 如权利要求12所述的装置,其特征在于,所述处理模块,具体用于:The device according to claim 12, characterized in that the processing module is specifically used for:
    对所述初始文件信息所属初始文件进行编译处理,得到初始编译文件;Compile the initial file to which the initial file information belongs to obtain an initial compiled file;
    对所述依赖文件信息所属依赖文件进行编译处理,得到依赖编译文件;Compile the dependency file to which the dependency file information belongs to obtain a dependency compiled file;
    对所述初始编译文件所属的第一系统模块进行打包处理,生成模块级的第一文件资源包;Perform packaging processing on the first system module to which the initial compiled file belongs, and generate a module-level first file resource package;
    对所述依赖编译文件所属的第二系统模块进行打包处理,生成模块级的第二文件资源包。The second system module to which the dependency compiled file belongs is packaged to generate a module-level second file resource package.
  21. 如权利要求20所述的装置,其特征在于,所述处理模块,还用于:The device according to claim 20, characterized in that the processing module is also used to:
    删除所述第一系统模块中与所述初始文件对应的历史编译文件;Delete the historical compilation file corresponding to the initial file in the first system module;
    删除所述第二系统模块中与所述依赖文件对应的历史编译文件。Delete historical compilation files corresponding to the dependent files in the second system module.
  22. 如权利要求20所述的装置,其特征在于,所述处理模块,还用于:The device according to claim 20, characterized in that the processing module is also used to:
    根据所述第一文件资源包、所述第二文件资源包,以及第三文件资源包构建目标系统;Build a target system based on the first file resource package, the second file resource package, and the third file resource package;
    其中,所述第三文件资源包是第三系统模块对应的文件资源包,所述第三系统模块与所述第一系统模块和所述第二系统模块均不存在依赖关系。Wherein, the third file resource package is a file resource package corresponding to a third system module, and the third system module has no dependency relationship with either the first system module or the second system module.
  23. 一种电子设备,其特征在于,包括:An electronic device, characterized by including:
    至少一个处理器;以及at least one processor; and
    与所述至少一个处理器通信连接的存储器;其中,a memory communicatively connected to the at least one processor; wherein,
    所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行权利要求1-11中任一项所述的增量编译处理方法。The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform any one of claims 1-11 Incremental compilation processing method.
  24. 一种存储有计算机指令的非瞬时计算机可读存储介质,其特征在于,其中,所述计算机指令用于使所述计算机执行权利要求1-11中任一项所述的增量编译处理方法。A non-transient computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to execute the incremental compilation processing method described in any one of claims 1-11.
PCT/CN2022/100242 2022-06-21 2022-06-21 Incremental compilation processing method and apparatus, and electronic device and storage medium WO2023245449A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202280004590.8A CN117616387A (en) 2022-06-21 2022-06-21 Incremental compiling processing method and device, electronic equipment and storage medium
PCT/CN2022/100242 WO2023245449A1 (en) 2022-06-21 2022-06-21 Incremental compilation processing method and apparatus, and electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/100242 WO2023245449A1 (en) 2022-06-21 2022-06-21 Incremental compilation processing method and apparatus, and electronic device and storage medium

Publications (1)

Publication Number Publication Date
WO2023245449A1 true WO2023245449A1 (en) 2023-12-28

Family

ID=89378713

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/100242 WO2023245449A1 (en) 2022-06-21 2022-06-21 Incremental compilation processing method and apparatus, and electronic device and storage medium

Country Status (2)

Country Link
CN (1) CN117616387A (en)
WO (1) WO2023245449A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110184990A1 (en) * 2010-01-22 2011-07-28 Ronald Francis Murphy System and method for creating, managing, and reusing schema type definitions in services oriented architecture services, grouped in the form of libraries
WO2018072493A1 (en) * 2016-10-17 2018-04-26 宁德时代新能源科技股份有限公司 Compiling method and compiling system
CN109240698A (en) * 2017-06-08 2019-01-18 中国移动通信集团浙江有限公司 A kind of incremental compilation processing method and processing device
CN111796831A (en) * 2020-06-24 2020-10-20 苏州大学 Compiling method and device for multi-chip compatibility

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110184990A1 (en) * 2010-01-22 2011-07-28 Ronald Francis Murphy System and method for creating, managing, and reusing schema type definitions in services oriented architecture services, grouped in the form of libraries
WO2018072493A1 (en) * 2016-10-17 2018-04-26 宁德时代新能源科技股份有限公司 Compiling method and compiling system
CN109240698A (en) * 2017-06-08 2019-01-18 中国移动通信集团浙江有限公司 A kind of incremental compilation processing method and processing device
CN111796831A (en) * 2020-06-24 2020-10-20 苏州大学 Compiling method and device for multi-chip compatibility

Also Published As

Publication number Publication date
CN117616387A (en) 2024-02-27

Similar Documents

Publication Publication Date Title
CN106325970A (en) Compiling method and compiling system
US9208057B2 (en) Efficient model checking technique for finding software defects
EP2359247B1 (en) Transforming user script code for debugging
US8832125B2 (en) Extensible event-driven log analysis framework
US8839218B2 (en) Diagnosing alias violations in memory access commands in source code
CN115952758A (en) Chip verification method and device, electronic equipment and storage medium
CN113127050B (en) Application resource packaging process monitoring method, device, equipment and medium
US11030074B2 (en) Code update based on detection of change in runtime code during debugging
CN111475150B (en) Cross-language binding method, device, equipment and storage medium
JP2015011372A (en) Debug support system, method, program, and recording medium
US9740430B2 (en) Optimizing parallel build of application
US10839124B1 (en) Interactive compilation of software to a hardware language to satisfy formal verification constraints
CN110727476B (en) Method, device, equipment and storage medium for generating authorization configuration file
CN109284222B (en) Software unit, project testing method, device and equipment in data processing system
WO2023245449A1 (en) Incremental compilation processing method and apparatus, and electronic device and storage medium
US12039297B2 (en) Code inspection interface providing method and apparatus for implementing the method
JPWO2020157795A1 (en) Test equipment, test methods and test programs
US9645869B2 (en) Using exception information
CN111338761B (en) 51 single-chip microcomputer virtual interrupt controller and implementation method
US20200167152A1 (en) Identification of a partial code to be refactored within a source code
CN112114811A (en) Compiling method, device and equipment
US20030217356A1 (en) Register allocation for program execution analysis
US20220107825A1 (en) Measuring the Memory Usage of Java Programs
US10061604B2 (en) Program execution recording and playback
US8839207B2 (en) Debugging extensible markup language

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 202280004590.8

Country of ref document: CN

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22947229

Country of ref document: EP

Kind code of ref document: A1