Skip to content

ksh - Evaluate Removal of local #22

Description

@ReedClanton

Overview

The usage of local is breaking the unit tests of ksh. Determine what should be done about it.

Details

The repository I took most of the code in this repository from (shell_base), avoided the use of local. This is what allowed the functions to run in the Korn shell.

I've since added local to all my functions because I was running into issues where a local variable was getting clobbered by another called function. For example, calling logging() would break the function that used logging.

Determine why I wasn't seeing the issue that required the use of local originally. It was a long time ago, but I seem to recall that it had to do with how I added the functions to the shell environment. Maybe how or where I sourced them, or perhaps I didn't source them?

Justification

Removing the usage of local will allow for compatibility with the Korn shell.

External References

Take a look at how the shell_base's environmentSetup.sh script added functions to the user environment.

Artifact(s)

  • Create a PR that:
    • If it's very easy to alter how functions are sourced:
      • Updated how functions are sourced so the use of local isn't needed.
      • Re-enable the ksh unit tests.
      • Update documentation to state that ksh is supported.
    • If it's not possible to avoid the use of local, then:
      • Remove commented out the ksh unit tests and the GitHub action that installs ksh.
      • Update documentation to explain why ksh is not supported.
  • If it's possible to avoid the usage of local, but not trivial, create a GitHub issue for doing the work and updating documentation.

Scope

Determine a path forward, only fix if change is trivial.

Open a PR for This Issue

Relationship(s)

Found By

Found while working #3.

Blocked By

Gotta finish #3 before a pipeline will exist.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    designIndicates that design/evaluation is required rather than code, unit test, or documentation work.documentationImprovements or additions to documentationpathfindingSubset of total changes needed. Worked first to learn before rest of work is started.

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions