Debian Codegraph @

gopls/internal/golang/splitpkg/splitpkg.html.tmpl

raw
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta charset="UTF-8">
5 <title>{{.Title}}</title>
6 <link rel="stylesheet" href="/assets/common.css">
7 <link rel="stylesheet" href="/assets/splitpkg.css">
8 <script src="/assets/common.js"></script>
9 <script src="/assets/splitpkg.js"></script>
10 </head>
11 <body>
12 <h1>{{.Title}}</h1>
13
14 <p class='help'>
15 ⓘ Use this tool to decompose a package into a set of components
16 whose dependencies are acyclic.
17
18 First, name a set of <a href='#components'>components</a>.
19
20 Second, assign each <a href='#assign'>declaration</a> to an
21 appropriate component: check their checkboxes, choose a component, and
22 click Apply. Use the checkbox for a file to select all declarations in
23 that file.
24
25 Third, examine the set of <a href='#deps'>dependencies</a> between
26 components. Each inter-component dependency lists the symbol
27 references that cross the boundary. Click on one to navigate your
28 editor there.
29
30 If two or more components form a dependency cycle (⚠),
31 you will need to either change your code,
32 or change the component assignments.
33
34 Iterate this process.
35 Reload the page to refresh after each code change.
36 </p>
37 <p class='help'>
38 Once you are happy with the result, you can split the package,
39 renaming declarations as needed to export them.
40 In a future release, the code transformation will be automated.
41 </p>
42
43 <h2>Components</h2>
44 <div id="components"><!--programmatic--></div>
45
46 <p>
47 <input size="20" id="new-component" type='text'/>
48 <button id="add-component">Add component</button>
49 [<a href='#deps'>▼ see dependencies</a>]
50 </p>
51
52 <hr>
53
54 <h2>Declarations</h2>
55
56 <div id="assign">
57 <label for="assign-select">Assign selected declarations to component:</label>
58 <select id="assign-select"><!--programmatic--></select>
59 <button id="assign-apply">Apply</button>
60 </div>
61
62 <div id="files"><!--programmatic--></div>
63
64 <hr>
65
66 <h2>Component dependencies</h2>
67
68 <div id="deps"><!--programmatic--></div>
69 `