Skip to content
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

pandoc-citeproc: deprecate cabal v1 installation #59346

Conversation

chenrui333
Copy link
Member

@chenrui333 chenrui333 added the cabal v1 deprecation Deprecate cabal sandbox label Aug 8, 2020
@BrewTestBot BrewTestBot added the haskell Haskell use is a significant feature of the PR or issue label Aug 8, 2020
@chenrui333
Copy link
Member Author

==> Testing pandoc-citeproc
/usr/bin/sandbox-exec -f /private/tmp/homebrew20200809-30042-1a5tgrq.sb ruby -W0 -I $LOAD_PATH -- /usr/local/Homebrew/Library/Homebrew/test.rb /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/pandoc-citeproc.rb --verbose
==> /usr/local/Cellar/pandoc-citeproc/0.17.0.2_1/bin/pandoc-citeproc -y test.bib
pandoc-citeproc: /private/tmp/pandoc-citeproc-20200808-10788-zat36u/pandoc-citeproc-0.17.0.2/.brew_home/.cabal/store/ghc-8.8.4/pndc-ctprc-0.17.0.2-20c779f9/share/locales/locales-en-US.xml: openBinaryFile: does not exist (No such file or directory)

Error: pandoc-citeproc: failed
An exception occurred within a child process:
  Test::Unit::AssertionFailedError: <0> expected but was
<1>.

@chenrui333 chenrui333 added the test failure CI fails while running the test-do block label Aug 8, 2020
@chenrui333 chenrui333 closed this Aug 11, 2020
@chenrui333
Copy link
Member Author

Will dig a little bit this weekend.

@jdutant
Copy link

jdutant commented Sep 13, 2020

I've tried the commit changes and the installation goes through butpandoc-citeproc doesn't work. I don't know how to fix this but here is a description of what I did and the errors I've encountered, in case that helps.

Modified pandoc-citeproc.rb as suggested except for revision: 1:

  • deleted require "language/haskell" and include Language::Haskell::Cabal
  • in the def: install section replaced install_cabal_package with:
    system "cabal", "v2-update"
    system "cabal", "v2-install", *std_cabal_v2_args`

After that launched brew upgrade pandoc-citeproc and brew postinstall pandoc-citeproc. Both completed without error message.

~ % brew upgrade pandoc-citeproc

Updating Homebrew...
==> Upgrading 1 outdated package:
pandoc-citeproc 0.15.0.1 -> 0.17.0.2
==> Upgrading pandoc-citeproc 0.15.0.1 -> 0.17.0.2 
==> Downloading https://hackage.haskell.org/package/pandoc-citeproc-0.17.0.2/pandoc-citeproc-0.17.0.2.tar.gz
Already downloaded: /Users/juliend/Library/Caches/Homebrew/downloads/e1bda081560f986af1b1686ad7c32d6fd4e07d538a10bf99a1c9263b4bccbf55--pandoc-citeproc-0.17.0.2.tar.gz
==> cabal v2-update
==> cabal v2-install --jobs=4 --max-backjumps=100000 --install-method=copy --installdir=/usr/local/Cellar/pandoc-cit
==> Not running post_install as we're building a bottle
You can run it manually using `brew postinstall pandoc-citeproc`
🍺  /usr/local/Cellar/pandoc-citeproc/0.17.0.2: 6 files, 73.1MB, built in 96 minutes 14 seconds
Removing: /usr/local/Cellar/pandoc-citeproc/0.10.1... (63 files, 77.4MB)
Removing: /usr/local/Cellar/pandoc-citeproc/0.12.1... (65 files, 46.3MB)
Removing: /usr/local/Cellar/pandoc-citeproc/0.14.2... (65 files, 47.3MB)
Removing: /usr/local/Cellar/pandoc-citeproc/0.14.3.1... (65 files, 46.6MB)
Removing: /usr/local/Cellar/pandoc-citeproc/0.15.0.1... (66 files, 52.5MB)

~ % brew postinstall pandoc-citeproc
==> Postinstalling pandoc-citeproc

Then ran pandoc with --filter pandoc-citeproc on a markdown file with citations. Got an error saying that it couldn't find a citation style file:

~ % pandoc -s --filter pandoc-citeproc -t pdf -o test.pdf main.md
pandoc-citeproc: /private/tmp/pandoc-citeproc-20200913-36824-1vaostu/pandoc-citeproc-0.17.0.2/.brew_home/.cabal/store/ghc-8.8.4/pndc-ctprc-0.17.0.2-29b1463e/share/chicago-author-date.csl: openBinaryFile: does not exist (No such file or directory)
Error running filter pandoc-citeproc:
Filter returned error status 1

I placed a citation style file in the working directory and linked to it in my sample markdown file. I ran pandoc again. Now fot an error saying that another file (a locale file) is missing:

~ % pandoc -s --filter pandoc-citeproc -t pdf -o test.pdf main.md
pandoc-citeproc: /private/tmp/pandoc-citeproc-20200913-36824-1vaostu/pandoc-citeproc-0.17.0.2/.brew_home/.cabal/store/ghc-8.8.4/pndc-ctprc-0.17.0.2-29b1463e/share/locales/locales-en-US.xml: openBinaryFile: does not exist (No such file or directory)
Error running filter pandoc-citeproc:
Filter returned error status 1

In case that helps, here are the contents of INSTALL_RECEIPT.json in Cellar/pandoc-citeproc:

{"homebrew_version":"2.5.0",
	"used_options":[],
	"unused_options":[],
	"built_as_bottle":true,
	"poured_from_bottle":false,
	"installed_as_dependency":null,
	"installed_on_request":true,
	"changed_files":null,
	"time":1600019416,
	"source_modified_time":1596344527,
	"HEAD":"2ec8266697b2c9838cef86f8f97b5f392d0f926d",
	"stdlib":null,
	"compiler":"clang",
	"aliases":[],
	"runtime_dependencies":[{
		"full_name":"pandoc",
		"version":"2.10.1"
		}],
	"source":{
			"path":"/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/pandoc-citeproc.rb",
			"tap":"homebrew/core",
			"spec":"stable",
			"versions":{
				"stable":"0.17.0.2",
				"head":"HEAD",
				"version_scheme":0}
			},
	"built_on":{
		"os":"Macintosh",
		"os_version":"macOS 10.15.6",
		"cpu_family":"haswell",
		"xcode":"11.5",
		"clt":"11.5.0.0.1.1588476445"}
}

@chenrui333 chenrui333 deleted the pandoc-citeproc-cabal-v1-deprecation branch December 18, 2022 05:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cabal v1 deprecation Deprecate cabal sandbox haskell Haskell use is a significant feature of the PR or issue test failure CI fails while running the test-do block
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants