Commit Graph

284 Commits

Author SHA1 Message Date
Alexander Bantyev
cdf02b8ea1
Fix copyright info
Co-authored-by: Ivan Gromakovskii <gie1994@gmail.com>
2020-06-29 20:51:53 +03:00
Alexander Bantyev
3dbff2ca93
Add ways to get xrefcheck to readme 2020-06-29 17:49:30 +03:00
Alexander Bantyev
a16fbbc57d
Add ability to build with docker 2020-06-29 17:49:23 +03:00
Konstantin Ivanov
53344d09ce
Merge pull request #44 from serokell/martoon/smart-progress-option
Disable progress bar in CI automatically
2020-06-27 22:47:19 +03:00
martoon
0d6e61905f
Make a release 2020-06-26 22:32:03 +03:00
martoon
967da232d3
Disable progress bar in CI automatically
Problem: we have two major use cases:

1. Using xrefcheck in CI, in this case it is annoying for devops to
always pass mostly always reasonable `--no-progress` option.
2. Using it locally, here we want progress bar to be enabled by default
so that user could run `xrefcheck` without any options most of the time.

Solution:

Detect whether are we running in CI and use the respective default for
whether progress bar should be displayed.

Detecting whether we are within CI is possible using `CI` env variable,
at least Github actions, Gitlab CI and Buildkite pass this env.

`--no-progress` option still can be passed if user wants to suppress
progress bar in local run. The opposite `--progress` seems to also make
sense, because in case if high timeouts are set, user probably wants to
track progress somehow to make sure that CI didn't hang. So we add the
latter, and these two options can be used to override the default
behaviour defined by `CI` env var.
2020-06-26 22:32:03 +03:00
Alexander Bantyev
be03fa9c76
Merge pull request #41 from serokell/fix-release
Fix release
2020-06-26 21:32:48 +03:00
Alexander Bantyev
771d0abe42
Adapt release/default.nix to work with new release-binary script 2020-06-26 21:19:38 +03:00
Ivan Gromakovskii
72b0cbd98e
Merge pull request #37 from serokell/gromak/#36-new-resolver
[#36] Switch to lts-15.13
2020-06-10 19:12:42 +03:00
Alexander Bantyev
4f94e4a8a8
Add numa to static libraries 2020-06-09 13:15:09 +03:00
Zhenya Vinogradov
7d0ac7cc31
Update haskell.nix invocation
haskell.nix interface changed
2020-06-09 13:15:08 +03:00
Ivan Gromakovskii
086df1c03f
Update haskell.nix
So that we can build with a newer Stackage resolver on CI.
2020-06-09 13:15:07 +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
Ivan Gromakovskii
2a29c79123
Merge pull request #34 from serokell/gromak/drop-autoexporter
Drop autoexporter usage
2020-05-19 21:21:44 +03:00
Ivan Gromakovskii
557cbeef54
Update version and changelog
Hopefully with recent changes Hackage will finally manage to
build this package, so let's try uploading again.
2020-05-19 21:15:51 +03:00
Ivan Gromakovskii
ccc402574e
[#30] Depend on base instead of base-noprelude
Problem: base-noprelude is a non-standard dependency, unlike `base`.
Due to our use of `mixins` we don't need `base-noprelude` anymore,
we can just hide `Prelude`.

Solution: use `base` and hide `Prelude`.
2020-05-19 21:07:05 +03:00
Ivan Gromakovskii
c87b37e724
Drop autoexporter usage
Problem: `autoexporter` is used in one place to re-export one module.
Probably one day it will re-export more, but at this point it's really
overkill.
Moreover, it causes Hackage build to fail for the reasons mentioned
here:
https://github.com/haskell/hackage-server/issues/821

Solution: stop using it, re-export manually.
2020-05-19 20:57:31 +03:00
Konstantin Ivanov
e4eb7ac2cf
Merge pull request #33 from serokell/martoon/fix-hackage-upload
Mention 'Path_*` module in `package.yaml`
2020-05-16 22:05:50 +03:00
martoon
eb98aa70e4
Mention 'Path_* module in package.yaml`
Problem: after we started using mixins feature, generated .cabal file
requires cabal 2.0. Attempt to upload our package to Hackage now reports
an error, saying that `autogen-modules` section have to mention `Path_*`
files.

Solution: add `Paths_xrefcheck` to `generated-other-modules` section of
`package.yaml`.
2020-05-16 16:11:04 +03:00
Konstantin Ivanov
41e742a784
Merge pull request #32 from serokell/martoon/#30-avoid-loot-dep
Avoid loot-prelude dependency
2020-05-16 15:51:58 +03:00
martoon
8f0c955230
Make a new release
This should fix the build problems on Hackage.
2020-05-15 21:01:52 +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
Konstantin Ivanov
0b78a4693e
Merge pull request #24 from serokell/martoon/#1-not-scanned-cli
Add `ignored` CLI option
2020-04-28 19:32:12 +03:00
martoon
8e85855eb7
Bump version to 0.1.1 2020-04-28 19:25:28 +03:00
martoon
36226d0130
Update changelog 2020-04-28 19:25:28 +03:00
martoon
b7fbe7d3cc
Be more cross-platform
Problem: I mistakenly imported `System.FilePath.Posix` everywhere,
it, as expected, is proper only on POSIX systems.

Solution: use just `System.FilePath`.
2020-04-28 19:25:28 +03:00
martoon
00318b4849
[#19] Make ignored consider only exact matches
Problem: it's not good that `ignored` matches at file prefix, then if
someone marked `doc` folder as ignored, `doc-others` folder would be
ignored as well.

Solution: use exact matching. This requires user specifying
entries of `ignored` in specific format (e.g. `doc`, not `./doc`), but
let's don't bother about this for now.

Also, we already can ignore not only folders but also files, so we now
mention this in documentation.
2020-04-28 19:25:24 +03:00
martoon
2116b08232
[#19] Fix virtual files consideration
Problem: I applied canonicalization to those files before attaching
repository root to them, this made relative filepaths expand as if they
counted from the current working directory. Since now we allow passing
custom root, this is invalid.

Solution: accept repository root, canonicalize only after it is
attached.
2020-04-28 19:25:24 +03:00
martoon
3591341886
Make printed section headers more bold
Problem: when launching our verifier with `-v`, visually separating
repository data section from found errors section is difficult.

Solution: make section headers more noticable.
2020-04-28 19:25:24 +03:00
martoon
ca0beb5a28
[#19] Add not-scanned CLI option
Problem: it is often a case that in CI we copy xrefcheck repository into
the verified project, and we want to exclude folder with xrefcheck from
scan. Considering this in config is not too convenient, better add a CLI
option.

Solution: add this CLI option.

As in config, I call it `ignored`, because simpler `excluded` is too
general and it's not obvious what exactly it refers to - the set of
verified files or the set of supposedly non-existing files (in the
latter case references _to_ such files should also be prohibited).
2020-04-28 19:25:13 +03:00
Alexander Bantyev
30c0c860ba
Merge pull request #27 from serokell/yorickvp/bump-hs-nix
xrefcheck.nix: bump hs.nix, remove unneccesary flags
2020-04-10 01:47:34 +03:00
Yorick van Pelt
442554d41a
xrefcheck.nix: bump hs.nix, remove unneccesary flags
775c8cf756
fixed a bunch of problems with musl, we can now simplify and only need
the custom zlib.
2020-04-10 01:44:48 +03:00
Konstantin Ivanov
fe27d59680
Merge pull request #28 from serokell/martoon/fix-encoding-issues
Fix encoding issues
2020-04-09 22:43:50 +03:00
Alexander Bantyev
92fad6d256
Updating nixpkgs
So that it includes `with-utf8` package.
2020-03-26 01:00:14 +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
Alexander Bantyev
77d7023a5b
Merge pull request #23 from serokell/balsoft/nix-fixes
Remove haddock enforcer
2020-02-25 16:23:16 +03:00
Alexander Bantyev
2081a4718d
Remove haddock enforcer
Build dynamically so that haddock actually builds and remove the hack
that fails when haddock fails (because that has been implemented upstream)
2020-02-25 14:33:14 +03:00
Alexander Bantyev
5f7a8e7bde
Merge pull request #22 from serokell/balsoft/nix-fixes
Various nix changes
2020-02-18 17:54:49 +03:00
Alexander Bantyev
7b9804ff61
Update README to reflect updated haskell.nix version 2020-02-18 17:34:23 +03:00
Alexander Bantyev
443c34e3e4
Drop lootbox from niv 2020-02-18 17:32:47 +03:00
Alexander Bantyev
09a33353d6
Merge pull request #12 from serokell/balsoft/no-nix-cache
Automatically generate haskell.nix cache
2020-02-18 10:43:23 +03:00
Alexander Bantyev
31cde8652e
Automatically generate cache 2020-02-18 10:40:16 +03:00
Yorick
8effa193fe
Merge pull request #21 from serokell/yorickvp/no-github-token
buildkite: inject GITHUB_TOKEN via vault
2020-02-11 12:50:57 +01:00
Yorick van Pelt
1c7288cdb7
buildkite: inject GITHUB_TOKEN via vault 2020-02-10 20:55:01 +01:00
Ivan Gromakovskii
b54c38d91b
Merge pull request #18 from serokell/gromak/int111-changelog
Add a changelog, require its maintenance
2020-01-14 20:32:07 +03:00
Ivan Gromakovskii
ec9f8bae5e
Add a changelog, require its maintenance
Problem: we are going to release this tool and from that point
it would be nice to maintain its changelog.

Solution: add a simple CHANGES.md and update PR template.
2020-01-14 20:24:01 +03:00
Konstantin Ivanov
0c0ccb3867
Merge pull request #17 from serokell/martoon/int139-project-rename
[INT-139] Project rename
2020-01-14 19:46:14 +03:00
martoon
0c1d453e87
Rename module names
Problem: module names are prefixed with `Crv` which does not suit the
new project naming.

Solution: following the new `xrefcheck` name, rename modules so that
they start from `Xrefcheck`.
2020-01-14 19:41:47 +03:00
martoon
fd949bc3c8
Rename the project to xrefcheck
Problem: the previous name `crossref-verifier` was found long and
boring.

Solution: rename to `xrefcheck`.
2020-01-14 12:17:01 +03:00
Alexander Bantyev
38bd3b7920
Merge pull request #16 from serokell/balsoft/static-building
[INT-111] Allow to build crossref-verify statically
2019-12-26 15:56:50 +03:00