Yesod Quick Start Fails at Stack Build - yesod

I attempted to do the yesod quick start guide last night and on step 4 running stack build yields the errror
Error parsing targets: The specified targets matched no packages.
Perhaps you need to run 'stack init'?
running stack init yields a big large error as well
Is there any resolution for this?
Edit: Adding error from the stack init command
Looking for .cabal or package.yaml files to use to init the project.
Using cabal packages:
- ./
Selecting the best among 15 snapshots...
* Partially matches lts-13.21
aeson version 1.4.2.0 found
- edb-yesod requires >=0.6 && <1.4
classy-prelude version 1.5.0 found
- edb-yesod requires ==1.4.*
classy-prelude-conduit version 1.5.0 found
- edb-yesod requires ==1.4.*
classy-prelude-yesod version 1.5.0 found
- edb-yesod requires ==1.4.*
persistent version 2.9.2 found
- edb-yesod requires ==2.8.*
persistent-sqlite version 2.9.3 found
- edb-yesod requires ==2.8.*
yaml version 0.11.0.0 found
- edb-yesod requires ==0.8.*
Using package flags:
- edb-yesod: dev = False, library-only = False
Downloaded nightly-2019-05-18 build plan.
Unable to load cabal files for snapshot
----
Deleting cached snapshot file: /home/decapo/.stack/build-plan/nightly-2019-05-18.yaml
Recommendation: try running again. If this fails again, open an upstream issue at:
https://github.com/fpco/stackage-nightly/issues/new
----
Unable to parse cabal file for co-log-0.3.0.0#sha256:0eb5cf2598c3673f39a8e967a6a4f5043f4d1f1fcb50a844653c34fcf0cb068a,4508
- 0:0: Unsupported cabal-version. See https://github.com/haskell/cabal/issues/4899.
Edit 2
Adding output from stack new yesod-sqlite template
ยป stack new my-project-du yesod-sqlite
Downloading template "yesod-sqlite" to create project "my-project-du" in my-project-du/ ...
Looking for .cabal or package.yaml files to use to init the project.
Using cabal packages:
- my-project-du/
Selecting the best among 15 snapshots...
* Partially matches lts-13.21
aeson version 1.4.2.0 found
- my-project-du requires >=0.6 && <1.4
classy-prelude version 1.5.0 found
- my-project-du requires ==1.4.*
classy-prelude-conduit version 1.5.0 found
- my-project-du requires ==1.4.*
classy-prelude-yesod version 1.5.0 found
- my-project-du requires ==1.4.*
persistent version 2.9.2 found
- my-project-du requires ==2.8.*
persistent-sqlite version 2.9.3 found
- my-project-du requires ==2.8.*
yaml version 0.11.0.0 found
- my-project-du requires ==0.8.*
Using package flags:
- my-project-du: dev = False, library-only = False
Unable to load cabal files for snapshot
----
Deleting cached snapshot file: /home/decapo/.stack/build-plan/nightly-2019-05-18.yaml
Recommendation: try running again. If this fails again, open an upstream issue at:
https://github.com/fpco/stackage-nightly/issues/new
----
Unable to parse cabal file for co-log-0.3.0.0#sha256:0eb5cf2598c3673f39a8e967a6a4f5043f4d1f1fcb50a844653c34fcf0cb068a,4508
- 0:0: Unsupported cabal-version. See https://github.com/haskell/cabal/issues/4899.
Looks like something similar to the stack init command. For details on my system I'm running ubuntu mate 18.04 64-bit.

Related

GoogleCloudPlatform Buildpacks failed to build

I haven't changed anything recently in my project, but when I tried to deploy it last, I received this error in the logs: ERROR: Could not build wheels for pyarrow, which is required to install pyproject.toml-based projects
See the full log here: log-d20114fe-3eeb-4a8d-8926-3a971882894c.txt
This is my requirements.txt:
requirements.txt
It seems like it is an issue with the dependencies for the snowflake-connector-python package, but I am not really sure what would have caused this. I see in the logs:
-- Running cmake for pyarrow
Step #0 - "Buildpack": cmake -DPYTHON_EXECUTABLE=/layers/google.python.runtime/python/bin/python3 -DPython3_EXECUTABLE=/layers/google.python.runtime/python/bin/python3 "" -DPYARROW_BUILD_CUDA=off -DPYARROW_BUILD_FLIGHT=off -DPYARROW_BUILD_GANDIVA=off -DPYARROW_BUILD_DATASET=off -DPYARROW_BUILD_ORC=off -DPYARROW_BUILD_PARQUET=off -DPYARROW_BUILD_PARQUET_ENCRYPTION=off -DPYARROW_BUILD_PLASMA=off -DPYARROW_BUILD_S3=off -DPYARROW_BUILD_HDFS=off -DPYARROW_USE_TENSORFLOW=off -DPYARROW_BUNDLE_ARROW_CPP=off -DPYARROW_BUNDLE_BOOST=off -DPYARROW_GENERATE_COVERAGE=off -DPYARROW_BOOST_USE_SHARED=on -DPYARROW_PARQUET_USE_SHARED=on -DCMAKE_BUILD_TYPE=release /tmp/pip-install-w1g_50oc/pyarrow_4a54282bee5f4c3c8399d3428e4134e6
Step #0 - "Buildpack": error: command 'cmake' failed: No such file or directory
This makes me think CMake is the problem, but I tried explicitly adding CMake to my requirements file and had the same result.
I also looked at the last successful build, and it looks like I was running python version 3.10.8, and the one that failed first was running 3.11. How can I change what python version cloud build uses? I am using the cloudbuild.yaml file instead of docker.
Figured it out! The issue was with not specifying a version in Cloud Build for Python, so it was defaulting to 3.11, which does not yet have support for pyarrow. I ended up setting the version in the cloud build yaml file to 3.10.8 like so:
steps:
- name: gcr.io/k8s-skaffold/pack
env:
- GOOGLE_ENTRYPOINT=$_ENTRYPOINT
- GOOGLE_RUNTIME_VERSION=$_RUNTIME_VERSION
args:
- build
- '$_GCR_HOSTNAME/$PROJECT_ID/$REPO_NAME/$_SERVICE_NAME:$COMMIT_SHA'
- '--builder=gcr.io/buildpacks/builder:v1'
- '--network=cloudbuild'
- '--path=.'
- '--env=GOOGLE_ENTRYPOINT'
- '--env=GOOGLE_RUNTIME_VERSION'
For those of you who are using a Procfile
I was able to fix by creating a .python-version file that contains just the version number needed,
i.e. 3.10.4

Cake Addins install fail error during build

I am using net 4.8 framework. and cake version 0.38.2.
During build in Teamcity, it has to install addins cake.npm, cake.filehelpers. But following error happens
Could not find any assemblies compatible with .NETFramework,Version=v4.6.1.
Error: Failed to install addin 'Cake.Npm'.
When I use cake.npm version as 0.17.0 for cake 0.38.2, it generates two folders - cake.npm and cake.npm0.17.0. Only cake npm0.17.0 is required, because it has netstandard2.0 which can make build successful. But the other folder makes it fail
As discussed in https://github.com/cake-contrib/Cake.Npm/issues/140 Cake.Npm is not the culprit, here.
There is an additional (#load) reference in the project to Cake.Sitecore in version 1.0.3 which in contents/scripts/tasks.restore.cake contains the line
#addin "Cake.Npm"
This - without an explicit version being set - will always default to the newest version (currently 2.0.0, which is incompatible with Cake 0.38.2).
The current version of Cake.Sitecore (1.0.27) has that problem fixed.

How to update .NETStandard in VS 2017?

When installing TweetSharp I get this error message:
Install-Package : Package TweetSharp 2.3.1 is not compatible with netstandard1.4 (.NETStandard,Version=v1.4). Package TweetSharp 2.3.1 supports:
- net20 (.NETFramework,Version=v2.0)
- net35 (.NETFramework,Version=v3.5)
- net40 (.NETFramework,Version=v4.0)
- sl4 (Silverlight,Version=v4.0)
- sl4-wp (Silverlight,Version=v4.0,Profile=WindowsPhone)
- sl4-wp71 (Silverlight,Version=v4.0,Profile=WindowsPhone71)
I have tried updating .NETStandard to the most recent release being 2.0 but that doesn't work.
I have also tried using the command 'nuget.exe locals -clear all' that also doesn't work.
How can I update netstandard1.4 to one supported by TweetSharp?
Thank you.

What does "Searching Taps" Mean with HomeBrew?

I tried installing a c++ library by doing the following, and got the message below:
What does this mean? Did it install or did it not? I'm new to homebrew. Thanks!
macbook-2:~ ME$ brew install ceres-solver
Error: No available formula for ceres-solver
Searching taps...
homebrew/science/ceres-solver
macbook-2:~ ME$
From the Homebrew Formula Cookbook:
Formula - The package definition - /usr/local/Library/Formula/foo.rb
Keg - The installation prefix of a Formula - /usr/local/Cellar/foo/0.1
opt prefix - A symlink to the active version of a Keg - /usr/local/opt/foo
Cellar - All Kegs are installed here - /usr/local/Cellar
Tap - An optional Git repository of Formulae and/or commands - /usr/local/Library/Taps/homebrew/homebrew-versions
Bottle - Pre-built Keg used instead of building from source - qt-4.8.4.mavericks.bottle.tar.gz
I suggest starting with the Introduction on the same page.

yesod persistent dependencies missing

I have tried to follow the Yesod quick start from the official website, but when running yesod devel (after installation and running yesod init) it fails to build due to a missing dependency if I use sqlite, postgresql, postgresql+fay or mysql (the 'simple' option from yesod-init works fine).
The error messages given are:
For sqlite:
cabal: At least the following dependencies are missing:
persistent-sqlite ==1.3.*
For postgresql:
cabal: At least the following dependencies are missing:
persistent-postgresql ==1.3.*
For postgres + fay:
cabal: At least the following dependencies are missing:
fay >=0.16, persistent-postgresql ==1.3.*, yesod-fay >=0.5.0.1
For mysql:
cabal: At least the following dependencies are missing:
persistent-mysql ==1.3.*
For mongoDB:
cabal: At least the following dependencies are missing:
persistent-mongoDB ==1.3.*
Does anyone know what is going wrong and how it can be fixed?
Update:
I was able to fix some of the problems by installing, separately from the yesod-platform, some of the missing dependencies.
cabal install persistent-sqlite fixed any problems using sqlite.
cabal install persistent-postgresql and cabal install persistent-mysql worked after installing some extra distribution packages to my Mint 16 system (libpq-dev and libmysqlclient-dev).
cabal install persistent-mongodb failed with an error I could not resolve:
Resolving dependencies...
Configuring persistent-mongoDB-1.3.1...
Building persistent-mongoDB-1.3.1...
Preprocessing library persistent-mongoDB-1.3.1...
[1 of 1] Compiling Database.Persist.MongoDB ( Database/Persist/MongoDB.hs, dist/build/Database/Persist/MongoDB.o )
Database/Persist/MongoDB.hs:420:26:
Not in scope: type constructor or class `MonadThrow'
Failed to install persistent-mongoDB-1.3.1
cabal: Error: some packages failed to install:
persistent-mongoDB-1.3.1 failed during the building phase. The exception was:
ExitFailure 1
Does anybody know how to resolve this issue?
Update:
This final problem has been solved by the maintainer updating the cabal package.
There is a new version without this error (I have installed persistent-mongoDB-1.3.1.1, the previous version had the error you found).
Do a cabal update to refresh the packages list and try again.