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

Refactor Dune_engine.Targets #9407

Merged
merged 6 commits into from
Dec 12, 2023
Merged

Commits on Dec 12, 2023

  1. Refactor sandboxed directory targets

    We had similar but subtly different code for sandboxed and non-sandboxed directory targets. This patch unifies the two.
    
    We also no longer promote empty (sub)directories. Previously, this was only the case for sandboxed directory targets because we didn't move empty (sub)directories from the sandbox to the build dir.
    
    Signed-off-by: Roman Leshchinskiy <rleshchinskiy@janestreet.com>
    Roman Leshchinskiy authored and rleshchinskiy committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    b1c339b View commit details
    Browse the repository at this point in the history
  2. Remove Targets.Produced.Option

    There was some code duplication here which gets in the way of subsequent refactoring.  Let's get rid of it.
    
    Signed-off-by: Roman Leshchinskiy <rleshchinskiy@janestreet.com>
    Roman Leshchinskiy authored and rleshchinskiy committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    a9c2e85 View commit details
    Browse the repository at this point in the history
  3. Remove dependencies on Dune_engine from Targets

    This is a pure refactoring. The main goal is to be able to move Dune_engine.Targets into a separate package which can be used from dune_cache. However, I believe that it also makes the code simpler to follow overall.
    
    The main change is that we move everything to do with async file operations into Build_system which really is the only user of those, anyway.
    
    In addition, we also slightly generalise [Targets.Produced.collect_digests] and remove an unused pretty-printing function.
    
    Signed-off-by: Roman Leshchinskiy <rleshchinskiy@janestreet.com>
    Roman Leshchinskiy authored and rleshchinskiy committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    9b613b5 View commit details
    Browse the repository at this point in the history
  4. Fix test

    The test was creating a broken symlink which was subsequently ignored by
    Dune. We no longer ignore symlinks so this fails at a later stage. This
    patch makes the symlink be valid.
    
    Signed-off-by: Roman Leshchinskiy <rleshchinskiy@janestreet.com>
    Roman Leshchinskiy authored and rleshchinskiy committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    7c5cb74 View commit details
    Browse the repository at this point in the history
  5. fix: replace directory symlinking with copying

    Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
    rgrinberg authored and rleshchinskiy committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    a26b917 View commit details
    Browse the repository at this point in the history
  6. Revert "fix: replace directory symlinking with copying"

    This reverts commit 46011a8.
    
    Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
    rgrinberg authored and rleshchinskiy committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    92e776f View commit details
    Browse the repository at this point in the history