Deploying Haskell + Python on Heroku with multiple buildpacks

  buildpack, haskell, heroku, python

I am trying to deploy a Haskell web application calling into a Python backend spawned as a subprocess. I am pushing a single whose structure goes like this:

app
 |-- Main.hs
src
 |-- (Haskell source files)
test
 |-- (my test files)
Procile -- "web: <name of the haskell executable>-exe"
requirements.txt -- (my Python requirements)

I am using the following two buildpacks:

1. https://github.com/heroku/heroku-buildpack-python.git
2. https://github.com/mfine/heroku-buildpack-stack

pushing with git push heroku <my_branch_name>:main. However, I am getting the following error, and I don’t quite know how to make progress:

remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> Building on the Heroku-20 stack
remote: -----> Using buildpacks:
remote:        1. https://github.com/heroku/heroku-buildpack-python.git
remote:        2. https://github.com/mfine/heroku-buildpack-stack
remote: -----> Python app detected
remote: -----> Using Python version specified in Pipfile.lock
remote: -----> Installing python-3.8.10
remote: -----> Installing pip 20.2.4, setuptools 47.1.1 and wheel 0.36.2
remote: -----> Installing dependencies with Pipenv 2020.11.15
remote:        Installing dependencies from Pipfile.lock (be4dde)...
remote: -----> Installing SQLite3
remote: -----> Haskell app detected
remote: -----> 2021-06-16_20:43:35 Starting...
remote: -----> 2021-06-16_20:43:35 Exporting config var
remote: cp: '/tmp/build_a19d3811/./.heroku/python' and '/app/./.heroku/python' are the same file
remote:  !     Push rejected, failed to compile Haskell app.
remote: 
remote:  !     Push failed

any clue?

Source: Python Questions

LEAVE A COMMENT