PHANTOM
🇮🇳 IN
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
150 commits
Select commit Hold shift + click to select a range
8f5a1df
(aur) Bump stack resolver and fix servant-client issues
fosskers May 22, 2018
13d2a76
(aur) Use hpack and fix warnings
fosskers May 23, 2018
df7d588
(arel) Use hpack
fosskers May 23, 2018
4e0496b
(aura) Use hpack
fosskers May 23, 2018
f033472
(aura) Use `base-prelude`
fosskers May 23, 2018
afc07e7
(aura) Use `Shelly` instead of ad-hoc code
fosskers May 25, 2018
0890eb3
(aura) Simplify `MakePkg` module
fosskers May 25, 2018
3fb1315
(aura) Enforce `Text` in `Settings`
fosskers May 25, 2018
36616d7
(aura) Refactor core modules
fosskers May 25, 2018
454e5dd
(aura) Refactor satellite modules
fosskers May 25, 2018
66c69ed
(aura) Update "Command" modules
fosskers May 25, 2018
50cc0e8
(aura) Rework Main module to match lib changes
fosskers May 25, 2018
87c2db1
Email address updates
fosskers May 25, 2018
b00e8ec
(aura) `pacmanOutput` should run silently
fosskers May 25, 2018
f66f00d
(aura) Refactor package building functions
fosskers May 29, 2018
5c62657
(aura) Ensure that subprocesses hijack stdin correctly
fosskers May 29, 2018
7861fb6
(aura) Fix hot-editing
fosskers May 29, 2018
3126b37
(aura) Remove dead code
fosskers May 29, 2018
c6b101b
(aura) More dead code removal
fosskers May 29, 2018
764ef73
(aura) Linting via hlint
fosskers May 29, 2018
f444717
Update travis
fosskers May 29, 2018
4aa89da
(aura) Pacman module given explicit exports
fosskers May 29, 2018
39925ca
(aura) Linting
fosskers May 29, 2018
69feedb
(aura) More `String -> Text` conversion
fosskers May 29, 2018
a923833
(aura) Stop caring about `CARCH`
fosskers May 29, 2018
5a90c76
(aura) Use Shelly's `FilePath` more
fosskers May 29, 2018
8a9ea6d
(aura) Use `async` to speed up initial package lookups
fosskers May 30, 2018
c78e9f2
(aura) A few more lookups are now concurrent
fosskers May 30, 2018
5a1f069
(aura) First step in making dep checks concurrent
fosskers May 30, 2018
1d94d01
(aura) Concurrent dependency resolution
fosskers May 30, 2018
5a4a738
(aura) Handle dependency version conflicts
fosskers May 30, 2018
fa9597c
(aura) Remove `ExceptT` from Aura transformer stack
fosskers Jun 1, 2018
21bc661
(aura) Use `bitraverse` where possible
fosskers Jun 1, 2018
83de2f6
(aura) Improve `ifFile`
fosskers Jun 1, 2018
6e8d6a7
(aura) Death to `readFileUTF8`
fosskers Jun 1, 2018
a77eac6
(aura) Remove dead code
fosskers Jun 2, 2018
b4a9bad
(aura) Update copyright dates
fosskers Jun 2, 2018
bcb49ae
(aura) More minor linting
fosskers Jun 2, 2018
cb6edf4
(aura) Give proper credit for the Japanese translations
fosskers Jun 2, 2018
bcdf3d8
(aura) More fiddly linting
fosskers Jun 2, 2018
fb0e4ed
(aura) Prune dependencies
fosskers Jun 2, 2018
208c385
Update stack config
fosskers Jun 9, 2018
7b306c6
(aura) First pass at introducing `versions` lib
fosskers Jun 9, 2018
aaa9600
(aura) Back more logic w/ `versions` lib
fosskers Jun 9, 2018
f991975
(aura) Extract out backend logic into lib, added initial test suite
fosskers Jun 10, 2018
bc57c28
(aura) Confirm `simplepkg` behaviour
fosskers Jun 10, 2018
81283aa
(aura) Remove `ForeignPackage` in favour of `SimplePkg`
fosskers Jun 10, 2018
6022f25
(aura) Move many types to `Aura.Types`
fosskers Jun 10, 2018
4070681
(aura) Use published version of `versions`
fosskers Jun 10, 2018
fd74f2f
(aura) `extractVersion` no longer uses REGEX
fosskers Jun 10, 2018
49c8056
(aura) Refactor `L.hs` to only handle Text
fosskers Jun 11, 2018
a8ddf3d
(aura) All language strings are now `Text`
fosskers Jun 11, 2018
46dbaa7
(aura) Avoid more Regex
fosskers Jun 11, 2018
3149b70
(aura) Huge `String -> Text` conversion
fosskers Jun 11, 2018
ee18b8a
(aura) Be more careful about checking the build path
fosskers Jun 11, 2018
c5ddfe2
(aura) Pacman conf file is now parsed properly
fosskers Jun 11, 2018
5745c68
(aura) Minor lints
fosskers Jun 11, 2018
811328e
(aura) Linting `Utilities`
fosskers Jun 12, 2018
8252f1f
(aura) Cache and Log parsers
fosskers Jun 12, 2018
3de6e65
(aura) Simple form of `-L` and `-C` working
fosskers Jun 12, 2018
2c661f8
(aura) First pass at Orphan ops
fosskers Jun 12, 2018
9dfed13
Bump to GHC 8.4
fosskers Jun 13, 2018
1e55fca
(aura) Backup ops ported
fosskers Jun 13, 2018
30fa621
(aura) `-A` parsers
fosskers Jun 13, 2018
7362d6d
(aura) Delete `Aura.Flags`
fosskers Jun 14, 2018
5f85b57
(aura) Introduce `BuildConfig` and `BuildSwitch`
fosskers Jun 14, 2018
29457ab
(aura) Restore some sanity checks in `Settings` initialization
fosskers Jun 14, 2018
01d9d3c
(aura) Minor fix to make `-A <packages here>` work correctly
fosskers Jun 14, 2018
25ac89c
(aura) Parse `BuildConfig`
fosskers Jun 14, 2018
3cae579
(aura) Handle `Common` flags
fosskers Jun 14, 2018
0b95e43
(aura) More dead code removal
fosskers Jun 14, 2018
5d96500
(aura) Tweak `Flagable` typeclass to return `[Text]`
fosskers Jun 14, 2018
f8957f6
(aura) Parse a complete `CommonConfig`
fosskers Jun 14, 2018
a3ebc6b
(aura) Actually handle cache/log CLI args
fosskers Jun 14, 2018
b315b78
(aura) Can parse `-D` flags
fosskers Jun 14, 2018
baedf66
(aura) Can parse `-F` flags
fosskers Jun 14, 2018
a85292f
(aura) Can parse `-Q` flags
fosskers Jun 15, 2018
a9bc340
(aura) More `MiscOp` entries
fosskers Jun 15, 2018
a3a6c1a
(aura) Can parse `-R` flags
fosskers Jun 15, 2018
36c1a51
(aura) Make `--ignore` a common flag
fosskers Jun 15, 2018
b4633ae
(aura) Aggressively use `Set` instead of List for package names
fosskers Jun 15, 2018
2d50de6
(aura) Can parse `-S` flags
fosskers Jun 15, 2018
deeecc6
(aura) Can parse `-T` flags
fosskers Jun 15, 2018
c52297a
(aura) Minor syntax refactor
fosskers Jun 15, 2018
3a237d9
(aura) Can parse `-U` flags
fosskers Jun 15, 2018
16b8b09
(aura) Provide all `Language` flags
fosskers Jun 15, 2018
d26c439
(aura) Enable `--languages` flag
fosskers Jun 15, 2018
e46abed
(aura) Restore debug output and kill dead code
fosskers Jun 15, 2018
d295a3d
(aura) Linting
fosskers Jun 15, 2018
7e61b02
(aura) `Aura.Settings.Base` -> `Aura.Settings`
fosskers Jun 15, 2018
93f9daf
(aura) Before I forget...
fosskers Jun 16, 2018
2064fd4
(aura) Hide all subflags from the brief description
fosskers Jun 16, 2018
9d7e4d6
(aura) Minor lints
fosskers Jun 16, 2018
f55bb6e
(aura) Make pacman.conf parser a bit more robust
fosskers Jun 18, 2018
bf12a87
(aura) Minor improvement to the pacman.conf parsing test
fosskers Jun 18, 2018
7e1cb3e
(aura) Remove the `Aura` Monad in favour of `Eff`
fosskers Jun 19, 2018
5af7f83
(aura) Simpler type signature for `executeOpts`
fosskers Jun 19, 2018
e093d88
(aura) Restore `-C` call
fosskers Jun 19, 2018
44914b1
(aura) Cache: only match on the filenames (not the full path)
fosskers Jun 19, 2018
54242eb
(aura) Linting
fosskers Jun 19, 2018
97179d3
(aur) `ToJSON` instance for `AurInfo`
fosskers Jun 20, 2018
575083b
(aura) New `-A --aur` command that prints pretty JSON
fosskers Jun 20, 2018
45fc81e
(aura) Use `--json` instead of `--aur`
fosskers Jun 20, 2018
fdff56f
(aura) Repo checks should fail for AUR packages
fosskers Jun 20, 2018
2b023b2
(aura) Ignore release numbers when checking for dep versions conflicts
fosskers Jun 20, 2018
89be9dc
(aura) Do dep lookups in batch - fixes #478
fosskers Jun 20, 2018
6e865f9
(aura) Only build one instance of each Package Base - see #478
fosskers Jun 21, 2018
fb2716b
(aura) Prioritize the `Buildable` that owns the package group - see #478
fosskers Jun 21, 2018
54ba873
(aura) Map packages to dependencies via "Provides" - fixes #218
fosskers Jun 21, 2018
eb182e3
(aura) If necessary, let user select a dependency provider
fosskers Jun 21, 2018
e46aa87
(aura) Save package states as JSON
fosskers Jun 21, 2018
d85ebe4
(aura) Ensure the package state dir exists before writing to it
fosskers Jun 21, 2018
a11c6b6
(aura) Automatically save package states upon `-Au`
fosskers Jun 21, 2018
57fb475
(aura) Remove all custom text colouring
fosskers Jun 21, 2018
56c8172
(aura) Aura.Colour.Text -> Aura.Colour
fosskers Jun 21, 2018
32a0262
(aura) Mark as 2.0.0
fosskers Jun 22, 2018
0d04c52
(aura) Remove `Setup.hs`
fosskers Jun 22, 2018
cb64ec9
(aura) Reorganize docs
fosskers Jun 22, 2018
eeda368
(aura) First pass at CHANGELOG
fosskers Jun 22, 2018
87d50ea
(aura) Don't save states with `--dryrun`
fosskers Jun 22, 2018
4b4e31a
(aura) Fix built package file detection - fixes #463
fosskers Jun 22, 2018
f2a3af3
(aura) More changelog additions
fosskers Jun 22, 2018
f849da7
(aura) Provide `-Cb` as a short-hand for `-C --backup`
fosskers Jun 22, 2018
44357a5
(aura) Update README
fosskers Jun 22, 2018
3ff4a6c
(aura) Remove the "hacking" guide, it doesn't contain useful info any…
fosskers Jun 22, 2018
e277947
(aura) Revamp the Localisation guide
fosskers Jun 22, 2018
9892a3e
(aura) Tiny tweaks
fosskers Jun 22, 2018
6c28b7a
(aura) Thank the translators in the README
fosskers Jun 22, 2018
7ea6d2e
(aura) Update the man page
fosskers Jun 22, 2018
8a07908
(aura) Use `prettyprinter` instead of `ansi-wl-pprint`
fosskers Jun 22, 2018
e0742d3
(aura) If `--dryrun`, neither `-A` nor `-Au` require sudo
fosskers Jun 22, 2018
bb50896
(aura) `-Au` output is better aligned
fosskers Jun 22, 2018
0ef1b43
(aura) Remove custom diffing code
fosskers Jun 23, 2018
8705678
Update Portuguese translation
Jun 22, 2018
6ea7860
Add further translations not present in master
Jun 24, 2018
dbc5d61
Merge pull request #482 from wamaral/update-portuguese-translation
fosskers Jun 25, 2018
b3aeda5
(aura) Credit Wagner for improved Portuguese translations
fosskers Jun 25, 2018
d288fc5
(aura) Fix how translator names are rendered in `-V`
fosskers Jun 25, 2018
7884ed3
(aura) Don't colour backtick'd strings
fosskers Jun 25, 2018
14c654c
(aura) `ZonedTime` used in pkg states. `Aura.Time` removed.
fosskers Jun 25, 2018
f5ce174
(aura) All unused message strings removed
fosskers Jun 25, 2018
575240f
(aura) Fix build output being coloured green
fosskers Jun 25, 2018
2151fb9
(aura) Also flush "Solving dependencies..." message
fosskers Jun 25, 2018
47f4a91
(aura) More robust dep conflict errors
fosskers Jun 25, 2018
2387ebf
(aura) Remove 4x speedup claim
fosskers Jun 25, 2018
8ed145c
(aura) Messages are now `Doc`-based - see #102 #357
fosskers Jun 26, 2018
5ea035d
(aura) Parse `--color` as a shared flag
fosskers Jun 26, 2018
bd5258f
(aura) Check for colour settings before rendering Text
fosskers Jun 26, 2018
a3acb97
(aura) Auto-detect whether stdout is connected to a terminal
fosskers Jun 26, 2018
5d7f128
(aura) Update CHANGELOG regarding `--color`
fosskers Jun 26, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ addons:
# The different configurations we want to test. You could also do things like
# change flags or use --stack-yaml to point to a different file.
env:
- ARGS="--resolver nightly-2017-01-17"
- ARGS="--resolver lts-11.10"

before_install:
# Download and unpack the stack executable
Expand Down
25 changes: 0 additions & 25 deletions arel/arel.cabal

This file was deleted.

6 changes: 3 additions & 3 deletions arel/arel.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ViewPatterns #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveAnyClass #-}

Expand All @@ -13,7 +12,7 @@ import Shelly

---

data Env = Env { release :: T.Text } deriving (Generic, ParseRecord)
newtype Env = Env { release :: T.Text } deriving (Generic, ParseRecord)

projectDir :: FilePath
projectDir = "/home/colin/code/haskell/aura/"
Expand All @@ -39,8 +38,9 @@ makeNewPkgFile (Env v) = do

-- | The location of a built release tarball, the output of `stack sdist`.
-- Beware: the `cabal` version is not static.
-- See: https://github.com/commercialhaskell/stack/issues/3568
tarballPath :: Text -> FilePath
tarballPath v = fromText $ "aura/.stack-work/dist/x86_64-linux-nopie/Cabal-1.24.2.0/aura-" <> v <> ".tar.gz"
tarballPath v = fromText $ "aura/.stack-work/dist/x86_64-linux-tinfo6/Cabal-2.0.1.0/aura-" <> v <> ".tar.gz"

alterPKGBUILD :: Sh ()
alterPKGBUILD = do
Expand Down
28 changes: 28 additions & 0 deletions arel/package.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: arel
version: '1.1.0'
synopsis: Create an Aura release.
description: Create an Aura release.
category: System
author: Colin Woodbury
maintainer: colin@fosskers.ca
license: GPL-3

ghc-options:
- -fwarn-unused-imports
- -fwarn-unused-binds
- -fwarn-name-shadowing
- -fwarn-unused-matches
- -fwarn-incomplete-patterns
- -fwarn-incomplete-uni-patterns

dependencies:
- base >= 4.8 && < 4.12
- optparse-generic >= 1.1 && < 1.4
- shelly >= 1.6 && < 1.9
- text >= 1.2 && < 1.3

executables:
arel:
source-dirs: .
main: arel.hs
other-modules: []
6 changes: 3 additions & 3 deletions aur/Linux/Arch/Aur/Rpc.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

-- |
-- Module : Linux.Arch.Aur.Rpc
-- Copyright : (c) Colin Woodbury, 2014, 2015, 2016
-- Copyright : (c) Colin Woodbury, 2014 - 2018
-- License : GPL3
-- Maintainer: Colin Woodbury <colingw@gmail.com>
-- Maintainer: Colin Woodbury <colin@fosskers.ca>
--
-- See https://aur.archlinux.org/rpc for details.

Expand Down Expand Up @@ -53,4 +53,4 @@ search :: MonadIO m => Manager -> Text -> m [AurInfo]
search m p = unwrap m $ rpcS (Just "5") (Just "search") (Just p)

unwrap :: MonadIO m => Manager -> ClientM RPCResp -> m [AurInfo]
unwrap m r = liftIO . fmap (either (const []) _results) $ runClientM r (ClientEnv m url)
unwrap m r = liftIO . fmap (either (const []) _results) $ runClientM r (ClientEnv m url Nothing)
28 changes: 26 additions & 2 deletions aur/Linux/Arch/Aur/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

-- |
-- Module : Linux.Arch.Aur.Types
-- Copyright : (c) Colin Woodbury, 2014, 2015, 2016
-- Copyright : (c) Colin Woodbury, 2014 - 2018
-- License : GPL3
-- Maintainer: Colin Woodbury <colingw@gmail.com>
-- Maintainer: Colin Woodbury <colin@fosskers.ca>

module Linux.Arch.Aur.Types
( RPCResp(..)
Expand Down Expand Up @@ -79,3 +79,27 @@ instance FromJSON AurInfo where
v .:? "Keywords" .!= []

parseJSON _ = mzero

instance ToJSON AurInfo where
toJSON ai = object
[ "ID" .= aurIdOf ai
, "Name" .= aurNameOf ai
, "PackageBaseID" .= pkgBaseIdOf ai
, "PackageBase" .= pkgBaseOf ai
, "Version" .= aurVersionOf ai
, "Description" .= aurDescriptionOf ai
, "URL" .= urlOf ai
, "NumVotes" .= aurVotesOf ai
, "Popularity" .= popularityOf ai
, "OutOfDate" .= dateObsoleteOf ai
, "Maintainer" .= aurMaintainerOf ai
, "FirstSubmitted" .= submissionDateOf ai
, "LastModified" .= modifiedDateOf ai
, "URLPath" .= urlPathOf ai
, "Depends" .= dependsOf ai
, "MakeDepends" .= makeDepsOf ai
, "OptDepends" .= optDepsOf ai
, "Conflicts" .= conflictsOf ai
, "Provides" .= providesOf ai
, "License" .= licenseOf ai
, "Keywords" .= keywordsOf ai ]
68 changes: 0 additions & 68 deletions aur/aur.cabal

This file was deleted.

54 changes: 54 additions & 0 deletions aur/package.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: aur
version: 6.0.1
synopsis: Access metadata from the Arch Linux User Repository.
description: Access package information from Arch Linux\'s AUR via its
RPC interface. The main exposed functions reflect those of the RPC.

`info` gets metadata for one package.
`search` gets limited metadata for packages that match a given regex.

By default this library supports version 5 of the RPC,
and hence version 4.2+ of the AUR.

homepage: https://github.com/aurapm/aura
license: GPL-3
author: Colin Woodbury
maintainer: colin@fosskers.ca
copyright: 2018 Colin Woodbury
category: Linux

ghc-options:
- -fwarn-unused-imports
- -fwarn-unused-binds
- -fwarn-name-shadowing
- -fwarn-unused-matches
- -fwarn-incomplete-patterns
- -fwarn-redundant-constraints
- -Wincomplete-uni-patterns

dependencies:
- base >= 4.10 && < 4.12
- http-client >= 0.5 && < 0.6

library:
source-dirs: .
other-modules: []
dependencies:
- aeson >= 0.9 && < 1.4
- servant >= 0.9 && < 0.14
- servant-client >= 0.13 && < 0.14
- text

tests:
aur-test:
main: Test.hs
source-dirs: tests
other-modules: []
ghc-options:
- -threaded
- -with-rtsopts=-N
dependencies:
- aur
- tasty >= 0.11 && < 2.0
- tasty-hunit >= 0.9 && < 0.11
- http-client-tls >= 0.3 && < 0.4
6 changes: 3 additions & 3 deletions aur/tests/Test.hs
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ suite m = testGroup "RPC Calls"
]

infoTest :: Manager -> Assertion
infoTest m = info m ["aura"] >>= assert . not . null
infoTest m = info m ["aura"] >>= assertBool "Good package" . not . null

infoTest' :: Manager -> Assertion
infoTest' m = info m ["aura1234567"] >>= assert . null
infoTest' m = info m ["aura1234567"] >>= assertBool "Bad package" . null

searchTest :: Manager -> Assertion
searchTest m = search m "aura" >>= assert . not . null
searchTest m = search m "aura" >>= assertBool "Good search" . not . null

main :: IO ()
main = do
Expand Down
Loading