Skip to content

Add notes on limitations to retaining backwards compatibility#14049

Merged
seanbudd merged 4 commits into
masterfrom
addNotesOnModuleLevelVars
Aug 26, 2022
Merged

Add notes on limitations to retaining backwards compatibility#14049
seanbudd merged 4 commits into
masterfrom
addNotesOnModuleLevelVars

Conversation

@seanbudd

@seanbudd seanbudd commented Aug 23, 2022

Copy link
Copy Markdown
Member

Link to issue number:

See also #14050

Summary of the issue:

#14037 was closed because there was no way to preserve backwards compatibility.
This is the case for any module level variable which the NVDA API expects to support assignment.

Description of user facing changes

None

Description of development approach

Documentation has been added:

  • to warn developers about writing code which allows for future changes without breaking backwards compatibility.
  • keep track of cases which we cannot safely retain backwards compatibility, so that we can clearly define when API breaking changes are necessary

Testing strategy:

N/A

Known issues with pull request:

N/A

Change log entries:

N/A

Code Review Checklist:

  • Pull Request description:
    • description is up to date
    • change log entries
  • Testing:
    • Unit tests
    • System (end to end) tests
    • Manual testing
  • API is compatible with existing add-ons.
  • Documentation:
    • User Documentation
    • Developer / Technical Documentation
    • Context sensitive help for GUI changes
  • UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers
    • Localization in other languages / culture than English
  • Security precautions taken.

@seanbudd seanbudd requested a review from a team as a code owner August 23, 2022 01:57
@seanbudd seanbudd requested a review from feerrenrut August 23, 2022 01:57
@seanbudd seanbudd mentioned this pull request Aug 23, 2022
6 tasks
@seanbudd seanbudd self-assigned this Aug 23, 2022
@seanbudd seanbudd marked this pull request as draft August 23, 2022 04:52
@seanbudd seanbudd marked this pull request as ready for review August 23, 2022 06:31
@seanbudd seanbudd merged commit 5a4512e into master Aug 26, 2022
@seanbudd seanbudd deleted the addNotesOnModuleLevelVars branch August 26, 2022 01:07
@nvaccessAuto nvaccessAuto added this to the 2022.4 milestone Aug 26, 2022
seanbudd added a commit that referenced this pull request Aug 30, 2022
Supersedes #14037
See also #14049

Summary of the issue:
#14037 was closed because there was no way to preserve backwards compatibility.
This is the case for any module level variable which the NVDA API expects to support assignment (see also #14049).

globalVars contains many NVDA state variables which should not be changed by add-on authors.
As a result, globalVars should eventually be deprecated, in favour of encapsulation of these variables.
This will make retaining backwards compatibility possible in the future.

Description of user facing changes
None

Description of development approach
Added a deprecation warning and strategy to the docstring of globalVars.

Encapsulated some less used globalVars to provide an example of what the future API should look like.

runningAsSource was moved from globalVars as this is an unreleased variable. (#14015)
_allowDeprecatedAPI was moved as it is internal code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants