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

opam init for Windows shells #5220

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

Conversation

dra27
Copy link
Member

@dra27 dra27 commented Aug 3, 2022

Persisting a TODO list:

  • cmd:
    • Generate init.cmd
    • Generate variables.cmd
    • Update 2015 AutoRun commit to source init.cmd not opam env
    • 2015 clink commit -> provides init.lua, variables.lua, complete.lua and env_hook.lua (with a cleaner profile, therefore)
  • PowerShell:
    • complete.ps1
    • env_hook.ps1
    • Generate init.ps1
    • Generate variables.ps1
    • Ensure profile.ps1 is correctly updated
      • If powershell's the detected shell, use detected image
      • Otherwise, if requested, search for pwsh/powershell (as per --shell=)
      • If that doesn't exist, attempt the other host version
      • Fallback to calculating the location using SHGetFolder
  • VT console input for menu UI

queued on

@dra27 dra27 added this to the 2.2.0~alpha milestone Aug 4, 2022
@kit-ty-kate kit-ty-kate added the PR: WIP Not for merge at this stage label Aug 31, 2022
@dra27 dra27 force-pushed the more-windows-shell branch 2 times, most recently from 8d69cef to 138fc40 Compare September 12, 2022 15:44
@dra27 dra27 force-pushed the more-windows-shell branch 2 times, most recently from 3bc81d9 to 7946515 Compare January 19, 2023 16:31
@dra27 dra27 force-pushed the more-windows-shell branch 3 times, most recently from e055c2a to bb884b0 Compare February 7, 2023 09:39
@dra27 dra27 force-pushed the more-windows-shell branch 3 times, most recently from c5a1b0e to 8fa3ace Compare February 10, 2023 14:40
@rjbou rjbou mentioned this pull request May 8, 2023
@rjbou rjbou removed this from the 2.2.0~alpha milestone Jun 7, 2023
If the environment file is missing, recomputing it can take a noticeable
amount of time which delays every single return of the prompt when the
env_hook is enabled.

The use of atomic write on the environment file instead of a lock means
that the environment hooks can store the generated environment file if
it's missing, or needs regenerating.
dra27 added 2 commits June 2, 2024 15:39
On Windows, files older than the system uptime are automatically pruned.
On Unix, the original solution was using /tmp, but we could bind
something similar...
Returns %ProgramData%\opam now
@rjbou
Copy link
Collaborator

rjbou commented Jul 9, 2024

@dra27 should this be closed ?

@dra27
Copy link
Member Author

dra27 commented Jul 10, 2024

No, not yet - the stuff left in it needs not to be forgotten!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AREA: PORTABILITY PR: WIP Not for merge at this stage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants