From c3df2ded03589a4d1c0e9b55341c68150c186c68 Mon Sep 17 00:00:00 2001 From: correctmost <134317971+correctmost@users.noreply.github.com> Date: Wed, 2 Oct 2024 18:44:44 -0400 Subject: [PATCH] astroid: fix coverage builds (#12558) This is a temporary fix until Python 3.9+ is supported. --- projects/astroid/Dockerfile | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/projects/astroid/Dockerfile b/projects/astroid/Dockerfile index e9f40bad6021..c518add7b08f 100644 --- a/projects/astroid/Dockerfile +++ b/projects/astroid/Dockerfile @@ -20,7 +20,17 @@ RUN pip3 install --disable-pip-version-check --no-cache-dir pip==24.2 # Pin the astroid version to 3.2.4 until Python 3.9+ is supported on OSS-Fuzz: # https://github.com/google/oss-fuzz/pull/12027 -RUN git clone --depth=1 --branch=v3.2.4 https://github.com/pylint-dev/astroid +RUN git clone --branch=v3.2.4 https://github.com/pylint-dev/astroid + +# Apply crash fixes to fix coverage builds: +# https://github.com/pylint-dev/astroid/pull/2596 +# https://github.com/pylint-dev/astroid/pull/2597 +RUN cd astroid && \ + git show dfe1ccce8576fd5854e7eb578985d10f464c1b67 > crash.diff && \ + git apply --exclude=ChangeLog crash.diff && \ + git show d174ca24bde0bba7df63f024124381efe908330d > crash.diff && \ + git apply crash.diff && \ + rm crash.diff COPY *.py *.sh "$SRC/"