Skip to content

Coding standard: Deprecation rules #4424

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

Merged
merged 2 commits into from
Mar 23, 2019

Conversation

tautschnig
Copy link
Collaborator

Thus far, we operated an informal deprecation policy. This codifies our
informal six-months rule.

This has a soft dependency on #4423 as the SINCE macro will only be available once that PR is merged.

  • Each commit message has a non-empty body, explaining why the change was made.
  • n/a Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • n/a The feature or user visible behaviour I have added or modified has been documented in the User Guide in doc/cprover-manual/
  • n/a Regression or unit tests are included, or existing tests cover the modified code (in this case I have detailed which ones those are in the commit message).
  • n/a My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • n/a White-space or formatting changes outside the feature-related changed lines are in commits of their own.

Copy link
Member

@peterschrammel peterschrammel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the scope of this rule? code seems too general to be a useful guidance.

@tautschnig
Copy link
Collaborator Author

code seems too general to be a useful guidance.

Good point - would "API" work? Or "public API?"

@peterschrammel
Copy link
Member

What that be anything declared in a header file?

@tautschnig
Copy link
Collaborator Author

What that be anything declared in a header file?

In C++ it's really hard to pin down what is/isn't (part of) an API. I'd say anything that is meant to be used outside a module, where I would consider as "module" a directory.

```
marks `deprecated_method` as deprecated as of 2019-01-31. Any deprecated
functionality should remain in place for at least six months from the date of
deprecation. Before deprecating code, all in-tree uses should be replaced.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would perhaps add "or marked as deprecated".

Copy link
Contributor

@allredj allredj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✔️
Passed Diffblue compatibility checks (cbmc commit: b39726b).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/105538719

@peterschrammel
Copy link
Member

In C++ it's really hard to pin down what is/isn't (part of) an API.

That's not a property of C++, but of how we structure the code base.

meant to be used outside a module

Please add this definition to make it a bit clearer.

Thus far, we operated an informal deprecation policy. This codifies our
informal six-months rule.
This provides a broad guideline what an interface is and how to maintain
it.
@tautschnig
Copy link
Collaborator Author

I have made some changes to the wording and added a second commit that codifies the idea of an interface.

@tautschnig
Copy link
Collaborator Author

That's not a property of C++, but of how we structure the code base.

We might discuss this a bit more, but that's likely more efficient over drinks than via GitHub...

Copy link
Contributor

@allredj allredj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✔️
Passed Diffblue compatibility checks (cbmc commit: f3a8371).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/105539964

@tautschnig tautschnig merged commit 55b8fc0 into diffblue:develop Mar 23, 2019
@tautschnig tautschnig deleted the deprecation-rules branch March 23, 2019 14:11
@martin-cs
Copy link
Collaborator

How does this fit with the release cycle? If we are deprecating user-facing functionality should we give them at least one release where it has a warning?

@tautschnig
Copy link
Collaborator Author

How does this fit with the release cycle?

I think we were aiming for one release per quarter, so we should have one or two releases in between. But I'm not sure we are currently on track for quarterly releases...

@martin-cs
Copy link
Collaborator

martin-cs commented Mar 23, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants