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

Windows shell opam init #16

Closed
wants to merge 141 commits into from
Closed

Windows shell opam init #16

wants to merge 141 commits into from

Conversation

dra27
Copy link
Owner

@dra27 dra27 commented Jul 29, 2022

No description provided.

@dra27 dra27 force-pushed the more-windows-shell branch 5 times, most recently from 7c28973 to 0773da5 Compare August 4, 2022 13:10
@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 6 times, most recently from c5a1b0e to 8fa3ace Compare February 10, 2023 14:40
dra27 and others added 24 commits May 15, 2024 08:58
:= and =: now ensure that an empty directory empty is always introduced
then all the append operators ensure that an empty directory entry is
maintained (see env.test changes).
Fixes to reversal of environment updates
There are two problems we can encounter with symlinks on Windows:
- The user cannot create native symlinks (Developer Mode is not enabled)
- At the point that the symlink is created, the file it refers to does
  not exist

In this instance, Cygwin's tar falls back to its internal mechanisms,
which can't be read by opam and cause issues when copying directories,
etc.

This commit mitigates the directory copy by displaying a warning and
fixes the deletion of the directory by deleting the file anyway.
Mitigate copying/deletion of unrecognised symlinks
Update shell/install.sh for opam 2.1.6
Tweak incorrect case in `--cygwin-extra-packages`
The last-env files are now stored in `~/.opam/.last-env` dir.
Move last-env `OPAM_LAST_ENV` files outside the switch
The warnings emitted for guarded-dependency and no-dependency-guarded
are not strictly necessary as they are protected by a filter which
checks :installed (:installed at present never triggers warning 41).

The warning for no-dependency-unguarded is unequivocally correct.
Warning 41 is never triggered for the use of package:installed. Extend
this so that the warning is not triggered for any uses of package:foo
_underneath_ package:installed, i.e.
  "%{package:foo}% {package:installed}
can no longer cause warning 41 on package.
The previous change means that a variable will definitely not be
expanded unless the package has been installed. However, there is a
timing issue which is not desirable - there is no guarantee that if
either no-dependency-guarded or no-dependency-installed-only have been
installed that they will be installed before or after the current
package.

This instability is not desirable, either. The check is therefore
enhanced slightly so that foo:installed can only be used if depends or
depopts in some way mentions the package (rather than doing a full
tautology check on depends for whether foo is installed).
Relax warning 41 for package variables guarded by a :installed filter
dra27 added 3 commits June 2, 2024 15:29
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.
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
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.

8 participants