-
Notifications
You must be signed in to change notification settings - Fork 450
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
Strategy for handling dependencies to system releases #304
Comments
A few words regarding the motivation:
|
There isn't a simple and perfect solution, unfortunately. We ran into this when writing the ABAP Intro book. At the time it was written, many companies still used pre-7.4 ABAP (and quite a few still do probably), so we ended up providing two code examples, when it was applicable: one for 7.4+, with inline declarations and all, and one for earlier versions. I think it's fine to handle the version-dependent rules just like that. Simply state version X onward you do this, lower version do that. While I do agree that in general, the rules should reflect the latest version, realistically it's not the version available for many ABAPers and you still need to know what to do before that. Also agree on "minimum version" and I think it should be 7.4. Maybe this should be handled like a person's resume (aka CV): at some point, you update it to add newer stuff and at the same time remove/shorten old stuff. FIFO :) |
My team has run into this issue before as well while trying to adopt the clean ABAP rules. I feel like that having a separate file for deprecated rules is a bit of an overkill though, I'd prefer if a rule went into detail about what should be done in releases older than the current one (but only down to the minimum release, which is a good idea, and I agree that it should be 7.4 as well). |
I don't think this is a big issue, there aren't that many rules that are only possible on a super modern version, and having a deprecated style guide is a nice idea but disproportionate maintenance effort IMHO. Developers working on older systems should be aware of newer syntaxes and features and it should not be misleading to encounter a rule that is not possible on their version. |
We started this discussion in pull request #303. Can we define an approach on how to handle Clean ABAP for different system releases?
Right now, we mostly formulate each rule how it applies to the newest system release. This can become complicated, especially when the rules are different for various system releases. In the example of !303, the recommended data type for versions starting with 750 is
abap_boolean
, whileit wasxfeld
previously. Another example is the usuage ofENUM
. While constant classes are recommended for older releases,ENUM
is the preferred option for newer releases.My suggestion is the following approach:
This section only applies to system release 7.50 or higher.
).CleanABAP_deprecatedRules.md
). The rule should state from which to which release it is applicable to (e.g.This section is only applicable to releases up to 7.51.
).This rule only applies to system release 7.50 or higher. For earlier releases, please refer to rule XYZ
).The text was updated successfully, but these errors were encountered: