Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add compile-time awareness of use sites for DEPRECATED things. #448

Open
2 tasks
jemc opened this issue Feb 21, 2023 · 0 comments
Open
2 tasks

Add compile-time awareness of use sites for DEPRECATED things. #448

jemc opened this issue Feb 21, 2023 · 0 comments
Labels
complexity 2: significant This is non-trivial, but still not a major undertaking kind: feature: compiler Adding a new compiler feature or platform target kind: feature: tooling Adding new tooling or a new feature in existing tooling

Comments

@jemc
Copy link
Contributor

jemc commented Feb 21, 2023

It's become common practice for me when I do "rolling breaking changes" in Savi code to mark the old functions/types/etc as being DEPRECATED, using an annotation like this:

  :: DEPRECATED: Use `ByteStream.Pair.new` to create a reader and writer pair.
  :new to_reader(reader ByteStream.Reader.Private)
    @_target = ByteStream.Sink.ToReader.new(reader)

To make these annotations useful, we want to have the compiler be aware of them and expose features related to them, including:

  • A mode for building programs with savi that will include a pass checking for deprecated use sites, that will print any deprecated use sites and fail with a nonzero exit code if any were found.
  • LSP diagnostic messages (with yellow squiggly underlines) for deprecated use sites
@jemc jemc added complexity 2: significant This is non-trivial, but still not a major undertaking kind: feature: tooling Adding new tooling or a new feature in existing tooling kind: feature: compiler Adding a new compiler feature or platform target labels Feb 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
complexity 2: significant This is non-trivial, but still not a major undertaking kind: feature: compiler Adding a new compiler feature or platform target kind: feature: tooling Adding new tooling or a new feature in existing tooling
Projects
None yet
Development

No branches or pull requests

1 participant