Skip to content
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

Change lifecycle to support Linux and Windows #62

Closed
wants to merge 2 commits into from
Closed

Change lifecycle to support Linux and Windows #62

wants to merge 2 commits into from

Conversation

micahyoung
Copy link
Member

@micahyoung micahyoung commented Oct 22, 2019

Change lifecycle to support Linux and Windows

- Default Windows shell is Command Prompt (cmd.exe)
- Lifecycle binaries on Windows can be `.exe` or `.bat`
- Buildpack binaries on WIndows can be `.exe` or `.bat`
- Profile scripts are Batch Script (.bat) format
- Processes started with `direct = false` are loaded with Command Prompt
- CNB_*IDs should be SIDs on Windows

Readable

RFC PR

@micahyoung
Copy link
Member Author

micahyoung commented Oct 22, 2019

Opening this proposed spec PR to aid in discussion.

There's still a remaining open question from the RFC PR from @jkutner on whether Windows should be defined in an extension instead. Hopefully this diff - with what is hopefully a near-complete set of changes - can help that decision.

README.md Show resolved Hide resolved
@zmackie
Copy link
Contributor

zmackie commented Jan 29, 2020

WG comments: can "shell" in lifecycle.md footnote to the "shell" in the readme to make sure its clear that windows shell == .bat compatible and linux == bash 3+?

@micahyoung micahyoung requested a review from a team as a code owner February 14, 2020 13:54
Micah Young and others added 2 commits February 26, 2020 15:16
- Default Windows shell is Command Prompt (cmd.exe)
- Lifecycle binaries on Windows can be `.exe` or `.bat`
- Buildpack binaries on WIndows can be `.exe` or `.bat`
- Profile scripts are Batch Script (.bat) format
- Processes started with `direct = false` are loaded with Command Prompt
- CNB_*IDs should be SIDs on Windows
- Bash/Command Prompt reference global shell definition
- Generic Stdout/Stderr

Signed-off-by: Micah Young <myoung@pivotal.io>
Signed-off-by: Emily Casey <ecasey@pivotal.io>
- Clean up general Windows caveats
- Simplify OS-specifics on env var table

Signed-off-by: Micah Young <ymicah@vmware.com>
Signed-off-by: Andrew Meyer <ameyer@pivotal.io>
@hone
Copy link
Member

hone commented May 6, 2020

I'm not sure of a good example in specs, but Rust elegantly has a broad abstraction and then use extension traits to handle it. You can find all the OS extensions as part of std::os. A good example is not using modes directly like most other languages. For instance, Node.js has a modes parameter to many fs methods with the caveat documented:

Caveats: on Windows only the write permission can be changed, and the distinction among the permissions of group, owner or others is not implemented.

In Rust, modes is exclusive to the Unix Extension. Another example is getting information about a file. Rust has a struct std::fs::Metadata that is generic across all platforms, but then provides extension specific traits for both Windows and Unix.

I wonder for CNB (not blocking this PR), but if we want to re-organize to have OS specific "extensions" (documentation) that is more encapsulating that can be referenced out to.

@nebhale nebhale self-assigned this May 6, 2020
@nebhale nebhale added this to the Platform 0.4 milestone May 6, 2020
nebhale pushed a commit that referenced this pull request May 6, 2020
- Default Windows shell is Command Prompt (cmd.exe)
- Lifecycle binaries on Windows can be `.exe` or `.bat`
- Buildpack binaries on WIndows can be `.exe` or `.bat`
- Profile scripts are Batch Script (.bat) format
- Processes started with `direct = false` are loaded with Command Prompt
- CNB_*IDs should be SIDs on Windows
- Bash/Command Prompt reference global shell definition
- Generic Stdout/Stderr

[#62]

Signed-off-by: Micah Young <myoung@pivotal.io>
Signed-off-by: Emily Casey <ecasey@pivotal.io>
Signed-off-by: Ben Hale <bhale@pivotal.io>
nebhale pushed a commit that referenced this pull request May 6, 2020
- Clean up general Windows caveats
- Simplify OS-specifics on env var table

[#62]

Signed-off-by: Micah Young <ymicah@vmware.com>
Signed-off-by: Andrew Meyer <ameyer@pivotal.io>
Signed-off-by: Ben Hale <bhale@pivotal.io>
nebhale added a commit that referenced this pull request May 6, 2020
[resolves #62]

Signed-off-by: Ben Hale <bhale@pivotal.io>
@nebhale
Copy link
Contributor

nebhale commented May 6, 2020

Resolved by 2a8ca60

@nebhale nebhale closed this May 6, 2020
ekcasey pushed a commit that referenced this pull request Jul 28, 2020
- Default Windows shell is Command Prompt (cmd.exe)
- Lifecycle binaries on Windows can be `.exe` or `.bat`
- Buildpack binaries on WIndows can be `.exe` or `.bat`
- Profile scripts are Batch Script (.bat) format
- Processes started with `direct = false` are loaded with Command Prompt
- CNB_*IDs should be SIDs on Windows
- Bash/Command Prompt reference global shell definition
- Generic Stdout/Stderr

[#62]

Signed-off-by: Micah Young <myoung@pivotal.io>
Signed-off-by: Emily Casey <ecasey@pivotal.io>
Signed-off-by: Ben Hale <bhale@pivotal.io>
Signed-off-by: Emily Casey <ecasey@vmware.com>
ekcasey pushed a commit that referenced this pull request Jul 28, 2020
- Clean up general Windows caveats
- Simplify OS-specifics on env var table

[#62]

Signed-off-by: Micah Young <ymicah@vmware.com>
Signed-off-by: Andrew Meyer <ameyer@pivotal.io>
Signed-off-by: Ben Hale <bhale@pivotal.io>
Signed-off-by: Emily Casey <ecasey@vmware.com>
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.

6 participants