| OLD | NEW |
| 1 Generated Files | 1 Generated Files |
| 2 ================== | 2 ================== |
| 3 | 3 |
| 4 The intermediate representation passed from the Mojom parser (the frontend | 4 The intermediate representation passed from the Mojom parser (the frontend |
| 5 of the Mojom compiler) to the code generators (the backend of the Mojom | 5 of the Mojom compiler) to the code generators (the backend of the Mojom |
| 6 Compiler) is a `MojomFileGraph` described in mojom_types.mojom and | 6 Compiler) is a `MojomFileGraph` described in mojom_types.mojom and |
| 7 mojom_files.mojom in mojo/public/interfaces/bindings. Thus the Mojom compiler | 7 mojom_files.mojom in mojo/public/interfaces/bindings. Thus the Mojom compiler |
| 8 uses Mojo serialization to serialize the intermediate representation. | 8 uses Mojo serialization to serialize the intermediate representation. |
| 9 | 9 |
| 10 This situation potentially entails a circular dependency because it means that | 10 This situation potentially entails a circular dependency because it means that |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 ### Instructions for updating these files | 27 ### Instructions for updating these files |
| 28 1) Make changes to mojom_types.mojom and mojom_files.mojom. This may be done | 28 1) Make changes to mojom_types.mojom and mojom_files.mojom. This may be done |
| 29 either in the same patch as everything below or in its own initial patch. | 29 either in the same patch as everything below or in its own initial patch. |
| 30 2) Compile these files to produce new generated files: | 30 2) Compile these files to produce new generated files: |
| 31 ninja -C out/Debug mojo/public/interfaces/bindings. | 31 ninja -C out/Debug mojo/public/interfaces/bindings. |
| 32 3) Copy the newly generated mojom_files.mojom.go and mojom_types.mojom.go | 32 3) Copy the newly generated mojom_files.mojom.go and mojom_types.mojom.go |
| 33 into the appropriate locations in this directory. | 33 into the appropriate locations in this directory. |
| 34 4) mojom_files.mojom.go needs to be manually patched in a minor way. In the | 34 4) mojom_files.mojom.go needs to be manually patched in a minor way. In the |
| 35 import section at the top replace "mojo/public/interfaces/bindings/mojom_types" | 35 import section at the top replace "mojo/public/interfaces/bindings/mojom_types" |
| 36 with "mojom/mojom_tool/generated/mojom_types". | 36 with "mojom/generated/mojom_types". |
| 37 5) Update the Go code in the serialization module of the parser to compensate | 37 5) Update the Go code in the serialization module of the parser to compensate |
| 38 for the changes if necessary. (Not necessary if the changes in step 1 were | 38 for the changes if necessary. (Not necessary if the changes in step 1 were |
| 39 backward compatible.) | 39 backward compatible.) |
| 40 6) Perform the analog of steps 3, 4, 5 for the Python code in the backend of | 40 6) Perform the analog of steps 3, 4, 5 for the Python code in the backend of |
| 41 the compiler. See | 41 the compiler. See |
| 42 mojo/public/tools/bindings/pylib/mojom/generate/generated/README.md | 42 mojo/public/tools/bindings/pylib/mojom/generate/generated/README.md |
| 43 for instructions. | 43 for instructions. |
| 44 7) Land a patch containing your changes from steps 3 through 6. | 44 7) Land a patch containing your changes from steps 3 through 6. |
| OLD | NEW |