Skip to content

Consistent GHC ABI checking #2720

Open
Open
@hasufell

Description

@hasufell

Currently we do ABI checking here:

# check ABI
if "${GHC_PKG}" --version >/dev/null ; then
:
elif "${GHC_PKG}-${GHC_VERSION}" --version >/dev/null ; then
GHC_PKG=${GHC_PKG}-${GHC_VERSION}
else
err_ghc_pkg "${GHC_PKG}"
unset GHC_LIBDIR
return 1
fi
PKGCONF="${check_ghc_libdir}/package.conf.d"
MY_ABI_HASHES="$(for dep in $("${GHC_PKG}" --global --global-package-db "$PKGCONF" list --simple-output) ; do printf "%s:" "${dep}" && "${GHC_PKG}" --global --global-package-db "$PKGCONF" field "${dep}" abi --simple-output ; done | tr '\n' ' ' | xargs)"
if [ "${ABI_HASHES}" != "${MY_ABI_HASHES}" ] ; then
err_abi "${MY_ABI_HASHES}"
return 3
fi
unset PKGCONF

@wz1000 suggested this should maybe be done in haskell-language-server-wrapper binary directly. But @fendor noted that the logic to get GHC is actually in hie-bios and this PR is relevant: haskell/hie-bios#282

So we probably want to check ABI in/via hie-bios.


Background:

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: in discussionNot actionable, because discussion is still ongoing or there's no decision yet

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions