@ttsc/strip 0.37.1 → 0.38.0
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.
- package/driver/strip.go +13 -0
- package/package.json +1 -1
package/driver/strip.go
CHANGED
|
@@ -54,6 +54,19 @@ func (plugin) ApplyProgram(prog *driver.Program, ctx driver.PluginContext) error
|
|
|
54
54
|
return nil
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
+
// CheckProgram is ApplyProgram's analysis outcome without the rewrite. Only
|
|
58
|
+
// loading and parsing the strip configuration can fail; the statement filter
|
|
59
|
+
// cannot, so the same configuration steps decide the same error, and the
|
|
60
|
+
// source ASTs stay untouched for a resident check host (samchon/ttsc#1864).
|
|
61
|
+
func (plugin) CheckProgram(_ *driver.Program, ctx driver.PluginContext) error {
|
|
62
|
+
config, err := loadStripConfigMapWithReporters(ctx.Entry.Config, ctx.Cwd, ctx.Tsconfig, ctx.ReportHostInput, ctx.ReportHostInputHash, ctx.ReportHostInputRealpath, ctx.ReportObservationIncomplete)
|
|
63
|
+
if err != nil {
|
|
64
|
+
return err
|
|
65
|
+
}
|
|
66
|
+
_, err = parseStrip(config)
|
|
67
|
+
return err
|
|
68
|
+
}
|
|
69
|
+
|
|
57
70
|
// stripRewriter holds the resolved strip configuration for a single build.
|
|
58
71
|
type stripRewriter struct {
|
|
59
72
|
calls []callPattern
|
package/package.json
CHANGED