Commit Graph

22 Commits

Author SHA1 Message Date
Anton Sorokin
aba295b478
[#164] Use only '/' as path separator
Problem: in markdown links, '/' should always be used as path separator ,
e.g. GitHub renderer is not threating link `[x](a\b.md)` as a link
to file in dir `a`
We use OS-dependent file separators everywhere, so
e.g. `canonizeLocalRef "./a.md"="./a.md`"` on Windows

Solution: replace '\' to '/' while constructing repo tree if needed
and then use only '/', preferring functions from `System.FilePath.Posix`.
We can do this, since 'a/b' and `a\b` are equivalent paths on Windows
2022-11-29 19:35:17 +02:00
Anton Sorokin
82bf996615
[#201] Use nyan-interpolation for building error messages
Problem:
We often need to create large strings, and we use different
fmt tools for this (by-hand concatenation, unlinesF, etc).
Sometimes it is unclear or too heavy, and it always can
be called error-prone

Solution: use `int` quasiquoter to build large strings and
have nice-looking and easy-to-read code
2022-11-03 17:39:10 +02:00
Diogo Castro
b625a38f16
[Chore] Pull cmark-gfm 0.2.5 from hackage
Problem: in #158, we started using `optFootnotes` from the `cmark-gfm`
package. This feature hadn't yet been released on hackage, so we pulled
the package from its github repo.

Since then, cmark-gfm-0.2.5 has been released on hackage.

Solution: pull the latest version from hackage and add a lower bound on
the dependency.
2022-10-07 21:23:44 +01:00
Anton Sorokin
371c53d283
[#179] Drop roman-numerals
Problem: We depend on `roman-numerals` package,
which is outdatead and can't be built with
GHC 9.2.4, which is used by Hackage to generate Haddocks.

Solution: the only place we use this package is showing header levels,
so we can show them "by hands" instead
2022-10-04 19:46:33 +03:00
Diogo Castro
efd7dfd4d2
[Chore] Remove unnecessary extra-deps 2022-09-28 10:58:59 +01:00
Anton Sorokin
3df588ac8f
[#155] Footnote syntax support
Problem: we can wrongly report footnotes as broken links (#155),
because footnotes support is disabled by default in cmark-gfm

Solution: add `optFootnotes` to `commonMarkToNode`
(this option was recently added to cmark-gfm-hs,
so we need to temporarily pull it from github instead hackage)
2022-09-26 11:59:07 +03:00
Andrei Borzenkov
e460301275 [#107] Replace file-embed library with inline config
Problem: At new resolver version we recieved obscure error when tried to cross-compile project to Windows on CI. Changing file-embed version to the old one doesn't help us.

Solution: inline content of this file into haskell source, using raw-string-qq library, that helps us to avoid escaping and typing newline characters.
2022-07-08 13:01:13 +04:00
Andrei Borzenkov
b255445a55 [#107] Update stack resolver to the newer version
Problem: We had old resolver version, that used ghc 8.10.4 and outdated versions of libraries

Solution: Change resolver to lts 19.13, that uses ghc 9.0.2 and update haskell.nix configuration files to can build project via `nix-build` command
2022-07-08 13:01:13 +04:00
Andrey Demidenko
24226ac2d8
[#81] Add config option for protected links
Problem:
We do not know what to do with protected links, because we cannot check
them. So we have two options, assume that these links is valid or not.

Solution:
Provide config option for user to decide what to do - assume protected
links valid or not.
2021-10-08 13:29:19 +03:00
martoon
f17dd1b631
Bump to lts-17.3
Problem: someday we have to switch to the recent lts.

Solution: let's do this now.

Also update `with-utf8` package version.
2021-03-10 12:08:29 +03:00
martoon
d0ca7d7771
[#35] Stop using aeson-options
`aeson-options` package is going to be deprecated. Moreover, it does not
work in the recent lts.

Solution: use `aeson-casing` package instead.
2021-03-10 12:08:29 +03:00
Zhenya Vinogradov
914f967caa
[OPS-1023] CI: pin hackage.nix and stackage.nix independently 2020-08-10 15:12:21 +03:00
Ivan Gromakovskii
59f188c496
[#36] Switch to lts-15.13
Problem: LTS-14.16 that we currently using and a bit old.
And its GHC is old as well.

Solution: update the resolver, make some changes that were necessary.
They are pretty trivial. The only essential breaking change is the
removal of `parseUrl` from `req`.
2020-05-23 18:41:11 +03:00
martoon
553c41c385
Avoid loot-prelude dependency
Problem: lootbox is not uploaded to hackage, so when we upload
xrefcheck, its build on hackage fails.

Solution: we can use `mixins` feature to set Universum as prelude
without any intermediate packages.

This seems to be supported even by quite old versions of stack, like
1.7.3, so that should not bring build problems in most cases.
2020-05-15 19:26:09 +03:00
martoon
be9d750624
Use UTF-8 encoding for stdin/stdout
Problem: we use many unusual unicode characters, on some locales this
may cause failures on attempt to print to stdout.

Solution: it is generally a good practice to set encoding of all
handlers to UTF-8, and this commit brings `with-utf8` package which does
that.
2020-03-25 16:37:43 +03:00
Ivan Gromakovskii
8060c7187b
[INT-128] Make the repository REUSE compliant
Problem: nowadays we want all files to store licensing information in
machine-readable format and to use reuse tool to check that. But the
repo is not REUSE compliant.

Solution: add `LICENSES` folder and licensing information for each
file.
2019-12-19 16:19:27 +03:00
Zhenya Vinogradov
3cf9b90625
Bump lootbox, making this buildable with stack 2 2019-12-16 10:07:19 +03:00
Ivan Gromakovskii
2ebbbc1d63
Use newer resolver
Problem: latest available LTS resolver is 14.16 and `crossref-verifier`
doesn't compile with it.

Solution: update resolver to 14.16. Newer versions of some packages
are used from now on. I assume that it shouldn't break anything as
long as tests pass.
`req` stopped using `Default` class, that's the only change in the code
I had to make.
2019-12-05 00:00:34 +03:00
Yorick van Pelt
47dac39907
bump lts to 13.19 2019-08-27 13:51:21 +02:00
martoon
b6c7cd6aea
Bump to lts-13.3 2019-04-13 20:05:34 +03:00
martoon
56b4e38308
[INT-31] Add config and CLI options 2018-10-11 17:27:59 +03:00
martoon
ea83f75643
[INT-31] Implement cross-references verifier 2018-10-11 02:51:28 +03:00