Skip to content

Consistent GHC ABI checking #2720

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

Open
hasufell opened this issue Feb 18, 2022 · 2 comments
Open

Consistent GHC ABI checking #2720

hasufell opened this issue Feb 18, 2022 · 2 comments
Labels
status: in discussion Not actionable, because discussion is still ongoing or there's no decision yet

Comments

@hasufell
Copy link
Member

hasufell commented Feb 18, 2022

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:

@hasufell hasufell added the status: in discussion Not actionable, because discussion is still ongoing or there's no decision yet label Feb 18, 2022
@pepeiborra
Copy link
Collaborator

Now that hie-bios 0.9.0 is out, has anything changed re ABI checking?

@hasufell
Copy link
Member Author

No. We still do abi checking in the shell script only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: in discussion Not actionable, because discussion is still ongoing or there's no decision yet
Projects
None yet
Development

No branches or pull requests

2 participants