Commits on Source 8

  • Benjamin Schubert's avatar
    ec4bbf35
  • Benjamin Schubert's avatar
    Don't register exceptions when not running the testsuite · b41a82d3
    Benjamin Schubert authored
    This fix a problem with the garbage collector not being able to
    clean the MetaElements that are loaded.
    
    On small projects this is not a problem, but in bigger projects, this
    can save a few hundred of MBs at runtime
    
    The reason behind this is, whenever we have a "stack" element, which
    has no stack.yaml configuration, since it doesn't need it, we would
    get an exception thrown when initiating the first one, as loading the
    yaml file would fail.
    
    This would capture the frame in which this command was executed, which
    references meta_elements. Therefore, as long as another exception is not
    thrown, the garbage collector would not be able to clean all the
    MetaElements.
    b41a82d3
  • Benjamin Schubert's avatar
    Merge branch 'bschubert/cleanup-local-state' into 'master' · 9db7f489
    Benjamin Schubert authored
    Cleanup MetaElement local state
    
    See merge request !1147
    9db7f489
  • Jürg Billeter's avatar
    utils.py: Change _ensure_real_directory() to not resolve symlinks · 2604b239
    Jürg Billeter authored
    Resolving symlinks during staging causes various issues:
    
    * Split rules may not work properly as the resolved paths will differ
      depending on whether another artifact with a directory symlink has
      been staged in the same root directory or not, e.g., as part of
      compose.
    
    * The order of symlinks in file lists is difficult to get right to
      guarantee consistent and predictable behavior as paths in a file list
      might rely on symlinks in the same file list. See #647 and #817.
    
    * Staging order differences can lead to surprising results. See #390.
    
    * Difficult to properly support absolute symlinks. Absolute symlinks are
      currently converted to relative symlinks, however, this doesn't always
      work. See #606 and #830.
    
    This will require changes in projects that rely on the current behavior.
    However, the changes are expected to be small and are often a sign of
    buggy element files. E.g., elements that don't fully obey `bindir` or
    `sbindir` variables.
    2604b239
  • Jürg Billeter's avatar
    _casbaseddirectory.py: Do not resolve symlinks · 6c07de6e
    Jürg Billeter authored
    This matches the change in utils._process_list().
    
    This also removes the _Resolver class as it is now unused. We may want
    to support controlled symlink resolution in the future, in which case
    the _Resolver class can be resurrected from this commit.
    6c07de6e
  • Jürg Billeter's avatar
    utils.py: Do not mangle absolute symlinks · b9539dd1
    Jürg Billeter authored
    Copy symlinks as they are, absolute or relative. We no longer resolve
    symlinks when copying files, which makes this safe.
    b9539dd1
  • Jürg Billeter's avatar
    75c9fad5
  • Jürg Billeter's avatar
    4eb31424
Loading
Loading