hiroshinishio / julia

The Julia Programming Language
https://julialang.org/
MIT License
0 stars 0 forks source link

GitAuto: "Inferrable" stdin for use with trimmed programs #7

Open gitauto-for-dev[bot] opened 3 months ago

gitauto-for-dev[bot] commented 3 months ago

Original issue: #6

What is the feature

The feature is to introduce a Core.stdin object that allows trimmed programs to accept data from standard input (stdin), similar to how Core.stdout and Core.stderr are used for output.

Why we need the feature

Currently, trimmed programs lack the ability to read from stdin, which limits their functionality and usability in scenarios where input data is provided via standard input. This feature will enable trimmed programs to handle input data more flexibly and align with the existing capabilities for output.

How to implement and why

  1. Define Core.stdin:

    • Introduce a new Core.stdin object within the core library, similar to Core.stdout and Core.stderr.
    • This object should be capable of reading data from the standard input stream.
  2. Modify the Core Library:

    • Update the core library files, likely within the src directory, to include the definition and initialization of Core.stdin.
    • Ensure that Core.stdin is properly integrated with the existing IO handling mechanisms.
  3. Update Documentation:

    • Modify relevant documentation files to include information about the new Core.stdin object and provide examples of its usage.
  4. Testing:

    • Add tests in the test directory to verify that Core.stdin works as expected, including edge cases and error handling.
  5. Backward Compatibility:

    • Ensure that the introduction of Core.stdin does not affect existing functionality. Since this is an addition rather than a modification, backward compatibility should be maintained.

About backward compatibility

The addition of Core.stdin should not affect backward compatibility as it introduces new functionality without altering existing features. Existing programs that do not use Core.stdin will continue to function as before.

Test these changes locally

git checkout -b gitauto-wes/issue-#6-2b3ba87e-344c-48db-af2d-8d86d1ac618d
git pull origin gitauto-wes/issue-#6-2b3ba87e-344c-48db-af2d-8d86d1ac618d