Summary
The 12 legacy top-level constructors in deprecated.go were superseded by the generic polyscript.New[E] constructor introduced in PR #103 (closes #84). They should be removed at the v1 cut once downstream users have had a release cycle to migrate.
Scope
Remove deprecated.go and deprecated_test.go entirely:
FromRisorFile, FromRisorFileWithData, FromRisorString, FromRisorStringWithData
FromStarlarkFile, FromStarlarkFileWithData, FromStarlarkString, FromStarlarkStringWithData
FromExtismFile, FromExtismFileWithData, FromExtismBytes, FromExtismBytesWithData
Each function is already annotated with a // Deprecated: doc comment pointing to the New[E] equivalent, so SA1019 will flag any remaining caller.
When
Land just before tagging v1.0.0. Do not land before there's been at least one minor release cycle on v0.x with the deprecation notices visible — gives downstream code reviews and IDE warnings a chance to fire.
Files
deprecated.go — DELETE
deprecated_test.go — DELETE
.golangci.yml — drop the *_test.go SA1019 exemption block (no longer needed)
- README — drop the trailing sentence about the older constructors still working
polyscript.go package doc — already only references New[E]; double-check
Migration notes for users
The mapping is mechanical:
// Before
polyscript.FromRisorString(script, handler)
// After
polyscript.New[polyscript.Risor](
polyscript.FromString(script),
polyscript.WithLogHandler[polyscript.Risor](handler),
)
(The handler arg can be omitted entirely now that #85 makes it optional.)
Summary
The 12 legacy top-level constructors in
deprecated.gowere superseded by the genericpolyscript.New[E]constructor introduced in PR #103 (closes #84). They should be removed at the v1 cut once downstream users have had a release cycle to migrate.Scope
Remove
deprecated.goanddeprecated_test.goentirely:FromRisorFile,FromRisorFileWithData,FromRisorString,FromRisorStringWithDataFromStarlarkFile,FromStarlarkFileWithData,FromStarlarkString,FromStarlarkStringWithDataFromExtismFile,FromExtismFileWithData,FromExtismBytes,FromExtismBytesWithDataEach function is already annotated with a
// Deprecated:doc comment pointing to theNew[E]equivalent, so SA1019 will flag any remaining caller.When
Land just before tagging
v1.0.0. Do not land before there's been at least one minor release cycle onv0.xwith the deprecation notices visible — gives downstream code reviews and IDE warnings a chance to fire.Files
deprecated.go— DELETEdeprecated_test.go— DELETE.golangci.yml— drop the*_test.goSA1019 exemption block (no longer needed)polyscript.gopackage doc — already only referencesNew[E]; double-checkMigration notes for users
The mapping is mechanical:
(The handler arg can be omitted entirely now that #85 makes it optional.)