https://github.com/JuliaLang/julia
Revision 642e6e93355f589304ebcdce91039c5ec9c5c1cb authored by Simeon Schaub on 14 June 2021, 19:40:14 UTC, committed by Simeon Schaub on 14 June 2021, 22:11:15 UTC
- `hash` did not respect the type of a factorization, so completely
  different factorizations with the same underlying data would result in
  same `hash` leading to inconsistencies with `isequal`. This likely
  doesn't occur very often in practice, but definitely seems worth
  fixing.
- `==` and `isequal` only returned true if two factorizations are of
  exactly the same type, which is inconsistent with their implementation
  for other objects and with the definition of `hash` for factorizations.
- Equality for `QRCompactWY` did not ignore the subdiagonal entries of
  `T` leading to nondeterministic behavior. Perhaps `T` should be
  directly stored as `UpperTriangular` in `QRCompactWY`, but that seems
  potentially breaking.

Relying on implementation details of `DataType` here is certainly less
than ideal, but I could not come up with a nicer solution.
1 parent 4a81b08
Raw File
Tip revision: 642e6e93355f589304ebcdce91039c5ec9c5c1cb authored by Simeon Schaub on 14 June 2021, 19:40:14 UTC
fix some issues with equality of factorizations
Tip revision: 642e6e9
delete-all-rpaths.sh
#!/bin/sh
# This file is a part of Julia. License is MIT: https://julialang.org/license

[ "$(uname)" = Darwin ] || { echo "Requires Darwin." 2>&1; exit 1; }

if [ $# -lt 1 ]; then
  echo "usage: $(basename $0) lib1 [lib2 ...]" 2>&1
  exit 1
fi

LIBS=''

# filter out symlinks
for lib in "$@" ; do
  if [ ! -L "$lib" ]; then
    LIBS="$LIBS $lib"
  fi
done

# regex to match and capture the path in a LC_RPATH as output by `otool -l`.
rpath_r="^ +path ([[:print:]]+) \(offset [[:digit:]]+\)$"

for lib in $LIBS ; do
  # Find the LC_RPATH commands, with two lines of trailing
  # context, and for each line look for the path to delete it.
  otool -l "$lib" | grep LC_RPATH -A2 |
  while IFS='' read -r line || [ -n "$line" ]; do
    if [[ $line =~ $rpath_r ]]; then
      echo $(basename $lib) deleting rpath "${BASH_REMATCH[1]}" \""$lib"\"
      install_name_tool -delete_rpath "${BASH_REMATCH[1]}" "$lib"
    fi
  done
done
back to top