expressir 2.1.29 → 2.1.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/docs.yml +98 -0
- data/.github/workflows/links.yml +100 -0
- data/.github/workflows/rake.yml +4 -0
- data/.github/workflows/release.yml +5 -0
- data/.github/workflows/validate_schemas.yml +1 -1
- data/.gitignore +3 -0
- data/.rubocop.yml +1 -1
- data/.rubocop_todo.yml +209 -55
- data/Gemfile +2 -1
- data/README.adoc +650 -83
- data/docs/Gemfile +12 -0
- data/docs/_config.yml +141 -0
- data/docs/_guides/changes/changes-format.adoc +778 -0
- data/docs/_guides/changes/importing-eengine.adoc +898 -0
- data/docs/_guides/changes/index.adoc +396 -0
- data/docs/_guides/changes/programmatic-usage.adoc +1038 -0
- data/docs/_guides/changes/validating-changes.adoc +681 -0
- data/docs/_guides/cli/benchmark-performance.adoc +834 -0
- data/docs/_guides/cli/coverage-analysis.adoc +921 -0
- data/docs/_guides/cli/format-schemas.adoc +547 -0
- data/docs/_guides/cli/index.adoc +8 -0
- data/docs/_guides/cli/managing-changes.adoc +927 -0
- data/docs/_guides/cli/validate-ascii.adoc +645 -0
- data/docs/_guides/cli/validate-schemas.adoc +534 -0
- data/docs/_guides/index.adoc +165 -0
- data/docs/_guides/ler/creating-packages.adoc +664 -0
- data/docs/_guides/ler/index.adoc +305 -0
- data/docs/_guides/ler/loading-packages.adoc +707 -0
- data/docs/_guides/ler/package-formats.adoc +748 -0
- data/docs/_guides/ler/querying-packages.adoc +826 -0
- data/docs/_guides/ler/validating-packages.adoc +750 -0
- data/docs/_guides/liquid/basic-templates.adoc +813 -0
- data/docs/_guides/liquid/documentation-generation.adoc +1042 -0
- data/docs/_guides/liquid/drops-reference.adoc +829 -0
- data/docs/_guides/liquid/filters-and-tags.adoc +912 -0
- data/docs/_guides/liquid/index.adoc +468 -0
- data/docs/_guides/manifests/creating-manifests.adoc +483 -0
- data/docs/_guides/manifests/index.adoc +307 -0
- data/docs/_guides/manifests/resolving-manifests.adoc +557 -0
- data/docs/_guides/manifests/validating-manifests.adoc +713 -0
- data/docs/_guides/ruby-api/formatting-schemas.adoc +605 -0
- data/docs/_guides/ruby-api/index.adoc +257 -0
- data/docs/_guides/ruby-api/parsing-files.adoc +421 -0
- data/docs/_guides/ruby-api/search-engine.adoc +609 -0
- data/docs/_guides/ruby-api/working-with-repository.adoc +577 -0
- data/docs/_pages/data-model.adoc +665 -0
- data/docs/_pages/express-language.adoc +506 -0
- data/docs/_pages/getting-started.adoc +414 -0
- data/docs/_pages/index.adoc +116 -0
- data/docs/_pages/introduction.adoc +256 -0
- data/docs/_pages/ler-packages.adoc +837 -0
- data/docs/_pages/parsers.adoc +683 -0
- data/docs/_pages/schema-manifests.adoc +431 -0
- data/docs/_references/index.adoc +228 -0
- data/docs/_tutorials/creating-ler-package.adoc +735 -0
- data/docs/_tutorials/documentation-coverage.adoc +795 -0
- data/docs/_tutorials/index.adoc +221 -0
- data/docs/_tutorials/liquid-templates.adoc +806 -0
- data/docs/_tutorials/parsing-your-first-schema.adoc +522 -0
- data/docs/_tutorials/querying-schemas.adoc +751 -0
- data/docs/_tutorials/working-with-multiple-schemas.adoc +676 -0
- data/docs/index.adoc +242 -0
- data/docs/lychee.toml +84 -0
- data/examples/demo_ler_usage.sh +86 -0
- data/examples/ler/README.md +111 -0
- data/examples/ler/simple_example.ler +0 -0
- data/examples/ler/simple_schema.exp +33 -0
- data/examples/ler_build.rb +75 -0
- data/examples/ler_cli.rb +79 -0
- data/examples/ler_demo_complete.rb +276 -0
- data/examples/ler_query.rb +91 -0
- data/examples/ler_query_examples.rb +305 -0
- data/examples/ler_stats.rb +81 -0
- data/examples/phase3_demo.rb +159 -0
- data/examples/query_demo_simple.rb +131 -0
- data/expressir.gemspec +2 -0
- data/lib/expressir/changes/schema_change.rb +32 -22
- data/lib/expressir/changes/{edition_change.rb → version_change.rb} +3 -3
- data/lib/expressir/cli.rb +12 -4
- data/lib/expressir/commands/changes_import_eengine.rb +2 -2
- data/lib/expressir/commands/changes_validate.rb +1 -1
- data/lib/expressir/commands/manifest.rb +427 -0
- data/lib/expressir/commands/package.rb +1274 -0
- data/lib/expressir/commands/validate.rb +70 -37
- data/lib/expressir/commands/validate_ascii.rb +607 -0
- data/lib/expressir/commands/validate_load.rb +88 -0
- data/lib/expressir/express/formatter.rb +5 -1
- data/lib/expressir/express/formatters/remark_item_formatter.rb +25 -0
- data/lib/expressir/express/parser.rb +33 -0
- data/lib/expressir/manifest/resolver.rb +213 -0
- data/lib/expressir/manifest/validator.rb +195 -0
- data/lib/expressir/model/declarations/entity.rb +6 -0
- data/lib/expressir/model/dependency_resolver.rb +270 -0
- data/lib/expressir/model/indexes/entity_index.rb +103 -0
- data/lib/expressir/model/indexes/reference_index.rb +148 -0
- data/lib/expressir/model/indexes/type_index.rb +149 -0
- data/lib/expressir/model/interface_validator.rb +384 -0
- data/lib/expressir/model/repository.rb +400 -5
- data/lib/expressir/model/repository_validator.rb +295 -0
- data/lib/expressir/model/search_engine.rb +525 -0
- data/lib/expressir/model.rb +4 -94
- data/lib/expressir/package/builder.rb +200 -0
- data/lib/expressir/package/metadata.rb +81 -0
- data/lib/expressir/package/reader.rb +165 -0
- data/lib/expressir/schema_manifest.rb +11 -1
- data/lib/expressir/version.rb +1 -1
- data/lib/expressir.rb +16 -3
- metadata +115 -5
- data/docs/benchmarking.adoc +0 -107
- data/docs/liquid_drops.adoc +0 -1547
|
@@ -0,0 +1,557 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Resolving Manifests
|
|
3
|
+
parent: Manifest Workflows
|
|
4
|
+
grand_parent: Guides
|
|
5
|
+
nav_order: 2
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
= Resolving Schema Manifests
|
|
9
|
+
|
|
10
|
+
== Purpose
|
|
11
|
+
|
|
12
|
+
This guide explains how to use the `manifest resolve` command to automatically find and add file paths for unresolved schemas in an existing manifest.
|
|
13
|
+
|
|
14
|
+
== What You'll Learn
|
|
15
|
+
|
|
16
|
+
* Using the `manifest resolve` command
|
|
17
|
+
* Understanding auto-resolution patterns
|
|
18
|
+
* When to use resolve vs manual editing
|
|
19
|
+
* Troubleshooting resolution failures
|
|
20
|
+
* Iterative resolution strategies
|
|
21
|
+
|
|
22
|
+
== Prerequisites
|
|
23
|
+
|
|
24
|
+
* Expressir installed
|
|
25
|
+
* An existing manifest file (created with `manifest create`)
|
|
26
|
+
* Understanding of link:creating-manifests.html[Creating Manifests]
|
|
27
|
+
|
|
28
|
+
== The `manifest resolve` Command
|
|
29
|
+
|
|
30
|
+
=== What Does It Do?
|
|
31
|
+
|
|
32
|
+
The `resolve` command takes an existing manifest file and attempts to find file paths for any schemas that are missing the `path:` field. It:
|
|
33
|
+
|
|
34
|
+
1. Reads the input manifest
|
|
35
|
+
2. Identifies schemas without paths
|
|
36
|
+
3. Searches in base directories using naming patterns
|
|
37
|
+
4. Writes a new manifest with resolved paths
|
|
38
|
+
5. Reports which schemas were resolved and which remain unresolved
|
|
39
|
+
|
|
40
|
+
**Important:** The original manifest file is never modified - a new file is created.
|
|
41
|
+
|
|
42
|
+
=== Basic Syntax
|
|
43
|
+
|
|
44
|
+
[source,bash]
|
|
45
|
+
----
|
|
46
|
+
expressir manifest resolve INPUT_MANIFEST.yaml -o OUTPUT_MANIFEST.yaml [OPTIONS]
|
|
47
|
+
----
|
|
48
|
+
|
|
49
|
+
=== Required Parameters
|
|
50
|
+
|
|
51
|
+
`INPUT_MANIFEST.yaml`::
|
|
52
|
+
The manifest file to resolve (typically created with `manifest create`)
|
|
53
|
+
|
|
54
|
+
`-o, --output OUTPUT_MANIFEST.yaml`::
|
|
55
|
+
Path where the resolved manifest will be written
|
|
56
|
+
+
|
|
57
|
+
The input file is left unchanged.
|
|
58
|
+
|
|
59
|
+
=== Optional Parameters
|
|
60
|
+
|
|
61
|
+
`--base-dirs DIRS`::
|
|
62
|
+
Comma-separated list of additional directories to search
|
|
63
|
+
+
|
|
64
|
+
If not provided, uses the base directories already in the manifest.
|
|
65
|
+
+
|
|
66
|
+
[source,bash]
|
|
67
|
+
----
|
|
68
|
+
--base-dirs /additional/path,/another/path
|
|
69
|
+
----
|
|
70
|
+
|
|
71
|
+
`--verbose`::
|
|
72
|
+
Show detailed resolution progress
|
|
73
|
+
+
|
|
74
|
+
Highly recommended to understand what's happening.
|
|
75
|
+
|
|
76
|
+
== Auto-Resolution Patterns
|
|
77
|
+
|
|
78
|
+
The resolver searches for schemas using these patterns:
|
|
79
|
+
|
|
80
|
+
=== Pattern 1: Direct Schema Name
|
|
81
|
+
|
|
82
|
+
Searches for: `<SCHEMA_ID>.exp`
|
|
83
|
+
|
|
84
|
+
[example]
|
|
85
|
+
.Example: Direct schema name
|
|
86
|
+
====
|
|
87
|
+
For schema `action_schema`, searches for:
|
|
88
|
+
----
|
|
89
|
+
action_schema.exp
|
|
90
|
+
----
|
|
91
|
+
|
|
92
|
+
In base directories:
|
|
93
|
+
----
|
|
94
|
+
/path/to/schemas/resources/action_schema.exp
|
|
95
|
+
/path/to/schemas/action_schema.exp
|
|
96
|
+
----
|
|
97
|
+
====
|
|
98
|
+
|
|
99
|
+
=== Pattern 2: STEP Module Pattern
|
|
100
|
+
|
|
101
|
+
For schemas ending in `_mim` or `_arm`:
|
|
102
|
+
|
|
103
|
+
1. Remove suffix → `Activity_method_mim` → `Activity_method`
|
|
104
|
+
2. Convert to lowercase → `activity_method`
|
|
105
|
+
3. Search for `<lowercase>/{mim,arm}.exp`
|
|
106
|
+
|
|
107
|
+
[example]
|
|
108
|
+
.Example: Module pattern
|
|
109
|
+
====
|
|
110
|
+
For schema `Activity_method_mim`, searches for:
|
|
111
|
+
----
|
|
112
|
+
activity_method/mim.exp
|
|
113
|
+
----
|
|
114
|
+
|
|
115
|
+
For schema `Geometric_model_arm`, searches for:
|
|
116
|
+
----
|
|
117
|
+
geometric_model/arm.exp
|
|
118
|
+
----
|
|
119
|
+
====
|
|
120
|
+
|
|
121
|
+
=== Search Priority
|
|
122
|
+
|
|
123
|
+
When multiple matches exist:
|
|
124
|
+
|
|
125
|
+
1. Exact name match in first base directory
|
|
126
|
+
2. Exact name match in subsequent base directories
|
|
127
|
+
3. Module pattern match in first base directory
|
|
128
|
+
4. Module pattern match in subsequent base directories
|
|
129
|
+
|
|
130
|
+
The **first match** is used.
|
|
131
|
+
|
|
132
|
+
== Step-by-Step: Resolving a Manifest
|
|
133
|
+
|
|
134
|
+
=== Step 1: Start with an Unresolved Manifest
|
|
135
|
+
|
|
136
|
+
After running `manifest create`, you have a manifest with unresolved schemas:
|
|
137
|
+
|
|
138
|
+
[source,yaml]
|
|
139
|
+
----
|
|
140
|
+
schemas:
|
|
141
|
+
Activity_method_mim: # No path
|
|
142
|
+
dependencies:
|
|
143
|
+
- schema_name: action_schema
|
|
144
|
+
kind: USE
|
|
145
|
+
geometric_model_schema: # No path
|
|
146
|
+
dependencies: []
|
|
147
|
+
----
|
|
148
|
+
|
|
149
|
+
=== Step 2: Run the Resolve Command
|
|
150
|
+
|
|
151
|
+
[source,bash]
|
|
152
|
+
----
|
|
153
|
+
expressir manifest resolve activity_manifest.yaml \
|
|
154
|
+
-o resolved_manifest.yaml \
|
|
155
|
+
--verbose
|
|
156
|
+
----
|
|
157
|
+
|
|
158
|
+
=== Step 3: Review the Output
|
|
159
|
+
|
|
160
|
+
[source]
|
|
161
|
+
----
|
|
162
|
+
Resolving schema paths in: activity_manifest.yaml...
|
|
163
|
+
Using base directories:
|
|
164
|
+
- /Users/user/iso-10303/schemas/resources
|
|
165
|
+
- /Users/user/iso-10303/schemas/modules
|
|
166
|
+
Attempting to resolve paths...
|
|
167
|
+
Activity_method_mim: ✓ found at activity_method/mim.exp
|
|
168
|
+
geometric_model_schema: ✗ not found
|
|
169
|
+
✓ Manifest resolved: resolved_manifest.yaml
|
|
170
|
+
Total schemas: 42
|
|
171
|
+
Resolved schemas: 41
|
|
172
|
+
|
|
173
|
+
⚠ Unresolved schemas (1):
|
|
174
|
+
- geometric_model_schema
|
|
175
|
+
|
|
176
|
+
These schemas could not be found in the search directories.
|
|
177
|
+
You may need to:
|
|
178
|
+
1. Add more base directories with --base-dirs
|
|
179
|
+
2. Manually edit resolved_manifest.yaml and set their paths
|
|
180
|
+
----
|
|
181
|
+
|
|
182
|
+
=== Step 4: Check the Resolved Manifest
|
|
183
|
+
|
|
184
|
+
[source,yaml]
|
|
185
|
+
----
|
|
186
|
+
schemas:
|
|
187
|
+
Activity_method_mim:
|
|
188
|
+
path: /Users/user/iso-10303/schemas/modules/activity_method/mim.exp # ← Added!
|
|
189
|
+
dependencies:
|
|
190
|
+
- schema_name: action_schema
|
|
191
|
+
kind: USE
|
|
192
|
+
geometric_model_schema: # Still unresolved
|
|
193
|
+
dependencies: []
|
|
194
|
+
----
|
|
195
|
+
|
|
196
|
+
== When to Use Resolve vs Manual Editing
|
|
197
|
+
|
|
198
|
+
=== Use `manifest resolve` When:
|
|
199
|
+
|
|
200
|
+
**Many unresolved schemas** (10+)::
|
|
201
|
+
Auto-resolution is faster than manual editing
|
|
202
|
+
|
|
203
|
+
**Standard naming conventions**::
|
|
204
|
+
Schemas follow the patterns described above
|
|
205
|
+
|
|
206
|
+
**Progressive resolution**::
|
|
207
|
+
You're adding base directories incrementally
|
|
208
|
+
|
|
209
|
+
**Verifying coverage**::
|
|
210
|
+
Checking if schemas exist in new locations
|
|
211
|
+
|
|
212
|
+
=== Use Manual Editing When:
|
|
213
|
+
|
|
214
|
+
**Non-standard locations**::
|
|
215
|
+
Schemas don't follow naming patterns
|
|
216
|
+
|
|
217
|
+
**Few unresolved schemas** (<5)::
|
|
218
|
+
Manual editing is quicker
|
|
219
|
+
|
|
220
|
+
**Known paths**::
|
|
221
|
+
You already know where the schemas are
|
|
222
|
+
|
|
223
|
+
**Custom organization**::
|
|
224
|
+
Project uses unique directory structure
|
|
225
|
+
|
|
226
|
+
=== Combine Both Approaches
|
|
227
|
+
|
|
228
|
+
Often the best strategy is:
|
|
229
|
+
|
|
230
|
+
1. Auto-resolve as many as possible
|
|
231
|
+
2. Manually edit the remaining few
|
|
232
|
+
3. Validate the result
|
|
233
|
+
|
|
234
|
+
== Iterative Resolution Strategy
|
|
235
|
+
|
|
236
|
+
For complex projects with schemas in many locations:
|
|
237
|
+
|
|
238
|
+
=== Round 1: Use Existing Base Directories
|
|
239
|
+
|
|
240
|
+
[source,bash]
|
|
241
|
+
----
|
|
242
|
+
expressir manifest resolve original.yaml -o round1.yaml --verbose
|
|
243
|
+
----
|
|
244
|
+
|
|
245
|
+
Check how many were resolved.
|
|
246
|
+
|
|
247
|
+
=== Round 2: Add More Base Directories
|
|
248
|
+
|
|
249
|
+
[source,bash]
|
|
250
|
+
----
|
|
251
|
+
expressir manifest resolve round1.yaml -o round2.yaml \
|
|
252
|
+
--base-dirs /additional/schemas,/more/schemas \
|
|
253
|
+
--verbose
|
|
254
|
+
----
|
|
255
|
+
|
|
256
|
+
=== Round 3: Manual Editing
|
|
257
|
+
|
|
258
|
+
For remaining unresolved schemas, manually add paths:
|
|
259
|
+
|
|
260
|
+
[source,bash]
|
|
261
|
+
----
|
|
262
|
+
vim round2.yaml
|
|
263
|
+
# Add path: for each remaining schema
|
|
264
|
+
----
|
|
265
|
+
|
|
266
|
+
=== Round 4: Final Validation
|
|
267
|
+
|
|
268
|
+
[source,bash]
|
|
269
|
+
----
|
|
270
|
+
expressir manifest validate round2.yaml --check-references --verbose
|
|
271
|
+
----
|
|
272
|
+
|
|
273
|
+
== Complete Example
|
|
274
|
+
|
|
275
|
+
Here's a complete resolution workflow:
|
|
276
|
+
|
|
277
|
+
[source,bash]
|
|
278
|
+
----
|
|
279
|
+
# Start with manifest created from root schema
|
|
280
|
+
$ expressir manifest create schemas/modules/activity/mim.exp \
|
|
281
|
+
-o activity.yaml \
|
|
282
|
+
--base-dirs schemas/resources \
|
|
283
|
+
--verbose
|
|
284
|
+
|
|
285
|
+
✓ Manifest created: activity.yaml
|
|
286
|
+
Resolved schemas: 35
|
|
287
|
+
⚠ Unresolved schemas (6):
|
|
288
|
+
- Activity_method_mim
|
|
289
|
+
- geometric_model_schema
|
|
290
|
+
- module_with_schema
|
|
291
|
+
- ...
|
|
292
|
+
|
|
293
|
+
# First resolution attempt with modules directory
|
|
294
|
+
$ expressir manifest resolve activity.yaml \
|
|
295
|
+
-o resolved1.yaml \
|
|
296
|
+
--base-dirs schemas/modules \
|
|
297
|
+
--verbose
|
|
298
|
+
|
|
299
|
+
Resolving schema paths in: activity.yaml...
|
|
300
|
+
Using base directories:
|
|
301
|
+
- /path/to/schemas/resources (from manifest)
|
|
302
|
+
- /path/to/schemas/modules (from --base-dirs)
|
|
303
|
+
Attempting to resolve paths...
|
|
304
|
+
Activity_method_mim: ✓ found at activity_method/mim.exp
|
|
305
|
+
geometric_model_schema: ✗ not found
|
|
306
|
+
module_with_schema: ✓ found at module_with_schema.exp
|
|
307
|
+
✓ Manifest resolved: resolved1.yaml
|
|
308
|
+
Total schemas: 41
|
|
309
|
+
Resolved schemas: 37
|
|
310
|
+
|
|
311
|
+
⚠ Unresolved schemas (4):
|
|
312
|
+
- geometric_model_schema
|
|
313
|
+
- ...
|
|
314
|
+
|
|
315
|
+
# Second resolution with additional directory
|
|
316
|
+
$ expressir manifest resolve resolved1.yaml \
|
|
317
|
+
-o resolved2.yaml \
|
|
318
|
+
--base-dirs schemas/integrated \
|
|
319
|
+
--verbose
|
|
320
|
+
|
|
321
|
+
Resolving schema paths in: resolved1.yaml...
|
|
322
|
+
Using base directories:
|
|
323
|
+
- /path/to/schemas/resources
|
|
324
|
+
- /path/to/schemas/modules
|
|
325
|
+
- /path/to/schemas/integrated (from --base-dirs)
|
|
326
|
+
Attempting to resolve paths...
|
|
327
|
+
geometric_model_schema: ✓ found at geometric_model_schema.exp
|
|
328
|
+
✓ Manifest resolved: resolved2.yaml
|
|
329
|
+
Total schemas: 41
|
|
330
|
+
Resolved schemas: 38
|
|
331
|
+
|
|
332
|
+
⚠ Unresolved schemas (3):
|
|
333
|
+
- custom_schema_1
|
|
334
|
+
- custom_schema_2
|
|
335
|
+
- custom_schema_3
|
|
336
|
+
|
|
337
|
+
# Manually edit for remaining schemas
|
|
338
|
+
$ vim resolved2.yaml
|
|
339
|
+
# Add paths for the 3 custom schemas
|
|
340
|
+
|
|
341
|
+
# Final validation
|
|
342
|
+
$ expressir manifest validate resolved2.yaml --check-references --verbose
|
|
343
|
+
|
|
344
|
+
✓ Manifest is valid
|
|
345
|
+
Total schemas: 41
|
|
346
|
+
Resolved schemas: 41
|
|
347
|
+
----
|
|
348
|
+
|
|
349
|
+
== Working with Base Directories
|
|
350
|
+
|
|
351
|
+
=== Understanding Base Directories in Manifests
|
|
352
|
+
|
|
353
|
+
Manifests store the base directories that were used during creation:
|
|
354
|
+
|
|
355
|
+
[source,yaml]
|
|
356
|
+
----
|
|
357
|
+
base_dirs:
|
|
358
|
+
- /Users/user/iso-10303/schemas/resources
|
|
359
|
+
- /Users/user/iso-10303/schemas/modules
|
|
360
|
+
----
|
|
361
|
+
|
|
362
|
+
=== Adding New Base Directories
|
|
363
|
+
|
|
364
|
+
When you run `manifest resolve` with `--base-dirs`:
|
|
365
|
+
|
|
366
|
+
[source,bash]
|
|
367
|
+
----
|
|
368
|
+
expressir manifest resolve manifest.yaml -o resolved.yaml \
|
|
369
|
+
--base-dirs /new/path
|
|
370
|
+
----
|
|
371
|
+
|
|
372
|
+
The new directories are **added** to existing ones, not replaced:
|
|
373
|
+
|
|
374
|
+
[source,yaml]
|
|
375
|
+
----
|
|
376
|
+
base_dirs:
|
|
377
|
+
- /Users/user/iso-10303/schemas/resources # Original
|
|
378
|
+
- /Users/user/iso-10303/schemas/modules # Original
|
|
379
|
+
- /new/path # Added
|
|
380
|
+
----
|
|
381
|
+
|
|
382
|
+
=== Removing Base Directories
|
|
383
|
+
|
|
384
|
+
To remove base directories, manually edit the manifest:
|
|
385
|
+
|
|
386
|
+
[source,yaml]
|
|
387
|
+
----
|
|
388
|
+
base_dirs:
|
|
389
|
+
- /Users/user/iso-10303/schemas/resources
|
|
390
|
+
# Removed: - /Users/user/iso-10303/schemas/modules
|
|
391
|
+
----
|
|
392
|
+
|
|
393
|
+
== Troubleshooting
|
|
394
|
+
|
|
395
|
+
=== No New Schemas Resolved
|
|
396
|
+
|
|
397
|
+
**Problem:** Resolve command finds no new schemas
|
|
398
|
+
|
|
399
|
+
**Causes:**
|
|
400
|
+
|
|
401
|
+
* Schemas don't follow naming patterns
|
|
402
|
+
* Wrong base directories provided
|
|
403
|
+
* Schemas in subdirectories not at pattern depth
|
|
404
|
+
|
|
405
|
+
**Solutions:**
|
|
406
|
+
|
|
407
|
+
1. **Check file names match patterns:**
|
|
408
|
+
```bash
|
|
409
|
+
find /path/to/schemas -name "*.exp" | head -20
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
2. **Verify schema names in files:**
|
|
413
|
+
```bash
|
|
414
|
+
grep "^SCHEMA " unresolved_schema.exp
|
|
415
|
+
```
|
|
416
|
+
|
|
417
|
+
3. **Try different base directory levels:**
|
|
418
|
+
```bash
|
|
419
|
+
# If schemas are in /path/to/iso-10303/schemas/resources/
|
|
420
|
+
# Try: /path/to/iso-10303/schemas
|
|
421
|
+
# Not: /path/to/iso-10303
|
|
422
|
+
```
|
|
423
|
+
|
|
424
|
+
=== Wrong Schema Resolved
|
|
425
|
+
|
|
426
|
+
**Problem:** Resolver finds the wrong schema file
|
|
427
|
+
|
|
428
|
+
**Cause:** Multiple files match the pattern
|
|
429
|
+
|
|
430
|
+
**Solution:** Reorder base directories - earlier directories have priority:
|
|
431
|
+
|
|
432
|
+
[source,bash]
|
|
433
|
+
----
|
|
434
|
+
# Wrong order (finds old version first)
|
|
435
|
+
--base-dirs old/schemas,new/schemas
|
|
436
|
+
|
|
437
|
+
# Correct order (finds new version first)
|
|
438
|
+
--base-dirs new/schemas,old/schemas
|
|
439
|
+
----
|
|
440
|
+
|
|
441
|
+
Or manually edit to specify exact path.
|
|
442
|
+
|
|
443
|
+
=== Resolved Path is Incorrect
|
|
444
|
+
|
|
445
|
+
**Problem:** Path was added but points to wrong file
|
|
446
|
+
|
|
447
|
+
**Solutions:**
|
|
448
|
+
|
|
449
|
+
1. Manually correct in the manifest
|
|
450
|
+
2. Adjust base directory order
|
|
451
|
+
3. Remove incorrect base directory
|
|
452
|
+
|
|
453
|
+
=== Case Sensitivity Issues
|
|
454
|
+
|
|
455
|
+
**Problem:** Schema exists but not found on case-sensitive filesystem
|
|
456
|
+
|
|
457
|
+
**Cause:** Schema name case doesn't match filename case
|
|
458
|
+
|
|
459
|
+
**Example:**
|
|
460
|
+
```
|
|
461
|
+
Manifest has: action_schema
|
|
462
|
+
File is named: Action_Schema.exp (wrong case)
|
|
463
|
+
```
|
|
464
|
+
|
|
465
|
+
**Solution:** Rename file to match schema name exactly, or manually edit manifest.
|
|
466
|
+
|
|
467
|
+
== Best Practices
|
|
468
|
+
|
|
469
|
+
=== Always Use --verbose
|
|
470
|
+
|
|
471
|
+
See what's happening during resolution:
|
|
472
|
+
|
|
473
|
+
[source,bash]
|
|
474
|
+
----
|
|
475
|
+
expressir manifest resolve manifest.yaml -o resolved.yaml --verbose
|
|
476
|
+
----
|
|
477
|
+
|
|
478
|
+
=== Keep Intermediate Files
|
|
479
|
+
|
|
480
|
+
Don't overwrite during iterative resolution:
|
|
481
|
+
|
|
482
|
+
[source,bash]
|
|
483
|
+
----
|
|
484
|
+
# Good: Preserves history
|
|
485
|
+
manifest resolve orig.yaml -o resolved1.yaml
|
|
486
|
+
manifest resolve resolved1.yaml -o resolved2.yaml
|
|
487
|
+
manifest resolve resolved2.yaml -o final.yaml
|
|
488
|
+
|
|
489
|
+
# Bad: Loses intermediate state
|
|
490
|
+
manifest resolve manifest.yaml -o manifest.yaml # Overwrites!
|
|
491
|
+
----
|
|
492
|
+
|
|
493
|
+
=== Validate After Each Resolution
|
|
494
|
+
|
|
495
|
+
Check if newly resolved schemas are valid:
|
|
496
|
+
|
|
497
|
+
[source,bash]
|
|
498
|
+
----
|
|
499
|
+
manifest resolve manifest.yaml -o resolved.yaml
|
|
500
|
+
manifest validate resolved.yaml --check-references
|
|
501
|
+
----
|
|
502
|
+
|
|
503
|
+
=== Document Base Directory Choices
|
|
504
|
+
|
|
505
|
+
Add comments in the manifest:
|
|
506
|
+
|
|
507
|
+
[source,yaml]
|
|
508
|
+
----
|
|
509
|
+
base_dirs:
|
|
510
|
+
- /path/to/schemas/resources # Standard resource schemas
|
|
511
|
+
- /path/to/schemas/modules # Application modules
|
|
512
|
+
- /vendor/schemas # Third-party schemas
|
|
513
|
+
----
|
|
514
|
+
|
|
515
|
+
== Advanced: Custom Resolution Scripts
|
|
516
|
+
|
|
517
|
+
For very complex resolution needs, create a custom script:
|
|
518
|
+
|
|
519
|
+
[source,ruby]
|
|
520
|
+
----
|
|
521
|
+
require 'expressir'
|
|
522
|
+
|
|
523
|
+
# Load manifest
|
|
524
|
+
manifest = Expressir::SchemaManifest.from_file('manifest.yaml')
|
|
525
|
+
|
|
526
|
+
# Custom resolution logic
|
|
527
|
+
manifest.schemas.each do |schema|
|
|
528
|
+
next if schema.path # Skip already resolved
|
|
529
|
+
|
|
530
|
+
# Your custom logic here
|
|
531
|
+
custom_path = find_schema_custom_logic(schema.id)
|
|
532
|
+
schema.path = custom_path if custom_path
|
|
533
|
+
end
|
|
534
|
+
|
|
535
|
+
# Save result
|
|
536
|
+
manifest.to_file('custom_resolved.yaml')
|
|
537
|
+
----
|
|
538
|
+
|
|
539
|
+
== Next Steps
|
|
540
|
+
|
|
541
|
+
Now that you can resolve manifests:
|
|
542
|
+
|
|
543
|
+
**Validate your manifest**::
|
|
544
|
+
See link:validating-manifests.html[Validating Manifests] to ensure everything is correct
|
|
545
|
+
|
|
546
|
+
**Build a package**::
|
|
547
|
+
Move to link:../../pages/ler-packages.html#building-from-manifests[Building from Manifests]
|
|
548
|
+
|
|
549
|
+
**Understand the workflow**::
|
|
550
|
+
Review link:index.html[Manifest Workflows] for the complete picture
|
|
551
|
+
|
|
552
|
+
== Bibliography
|
|
553
|
+
|
|
554
|
+
* link:../../pages/schema-manifests.html#resolving-schemas-from-a-manifest[Manifest Resolution Reference]
|
|
555
|
+
* link:creating-manifests.html[Creating Manifests]
|
|
556
|
+
* link:validating-manifests.html[Validating Manifests]
|
|
557
|
+
* link:index.html[Manifest Workflows Overview]
|