Skip to content

Commit

Permalink
Bump version to 0.13.3
Browse files Browse the repository at this point in the history
  • Loading branch information
jaspervdj-luminal committed Feb 10, 2021
1 parent 3f3f4c3 commit c734f5a
Show file tree
Hide file tree
Showing 36 changed files with 93 additions and 113 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ jobs:
- uses: 'actions/cache@v1'
with:
path: '~/.stack'
key: "${{ runner.os }}-v2-stack-${{ hashFiles('fregot.cabal', 'stack.yaml', 'stack.yaml.lock') }}"
restore-keys: '${{ runner.os }}-v2-stack'
key: "${{ runner.os }}-v3-stack-${{ hashFiles('fregot.cabal', 'stack.yaml', 'stack.yaml.lock') }}"
restore-keys: '${{ runner.os }}-v3-stack'
- run: 'make install test'
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# CHANGELOG

- 0.13.3 (2021-02-10)
* Bump `vector` dependency, GHC version and stackage LTS.

- 0.13.2 (2021-02-10)
* Bump `aeson` and `base64-bytestring` dependencies.
* Extend rule dependencies to use suffixes of rule keys, even if they
Expand Down
82 changes: 41 additions & 41 deletions fregot.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name: fregot
Version: 0.13.2
Version: 0.13.3
Synopsis: Fugue Rego Toolkit
License: Apache-2.0
License-file: LICENSE
Expand Down Expand Up @@ -137,46 +137,46 @@ Library
Paths_fregot

Build-depends:
aeson >= 1.4 && < 1.6,
aeson-pretty >= 0.8 && < 0.9,
annotated-wl-pprint >= 0.7 && < 0.8,
ansi-terminal >= 0.8 && < 0.11,
async >= 2.2 && < 2.3,
base >= 4.9 && < 5,
base16-bytestring >= 0.1 && < 0.2,
base64-bytestring >= 1.0 && < 1.2,
binary >= 0.8 && < 0.9,
blaze-html >= 0.9 && < 0.10,
bytestring >= 0.10 && < 0.11,
comonad >= 5.0 && < 5.1,
containers >= 0.6 && < 0.7,
directory >= 1.3 && < 1.4,
filepath >= 1.4 && < 1.5,
fsnotify >= 0.3 && < 0.4,
Glob >= 0.9 && < 0.11,
hashable >= 1.2 && < 1.4,
haskeline >= 0.7 && < 0.9,
HsYAML >= 0.2 && < 0.3,
HsYAML-aeson >= 0.2 && < 0.3,
indents >= 0.5 && < 0.6,
jose >= 0.8.3 && < 0.9,
lens >= 4.18 && < 4.20,
mtl >= 2.2 && < 2.3,
optparse-applicative >= 0.14 && < 0.16,
parsec >= 3.1 && < 4.2,
pcre-simple >= 0.1 && < 0.2,
pem >= 0.2 && < 0.3,
psqueues >= 0.2 && < 0.3,
scientific >= 0.3 && < 0.4,
text >= 1.2 && < 1.3,
time >= 1.8 && < 1.10,
timerep >= 2.0 && < 2.1,
unordered-containers >= 0.2 && < 0.3,
vector >= 0.12 && < 0.13,
vector-instances >= 3.4 && < 3.5,
x509 >= 1.7 && < 1.8,
yaml >= 0.11 && < 0.12,
zlib >= 0.6 && < 0.7
aeson >= 1.4 && < 1.6,
aeson-pretty >= 0.8 && < 0.9,
annotated-wl-pprint >= 0.7 && < 0.8,
ansi-terminal >= 0.8 && < 0.11,
async >= 2.2 && < 2.3,
base >= 4.9 && < 5,
base16-bytestring >= 0.1 && < 0.2,
base64-bytestring >= 1.0 && < 1.2,
binary >= 0.8 && < 0.9,
blaze-html >= 0.9 && < 0.10,
bytestring >= 0.10 && < 0.11,
comonad >= 5.0 && < 5.1,
containers >= 0.6 && < 0.7,
directory >= 1.3 && < 1.4,
filepath >= 1.4 && < 1.5,
fsnotify >= 0.3 && < 0.4,
Glob >= 0.9 && < 0.11,
hashable >= 1.2 && < 1.4,
haskeline >= 0.7 && < 0.9,
HsYAML >= 0.2 && < 0.3,
HsYAML-aeson >= 0.2 && < 0.3,
indents >= 0.5 && < 0.6,
jose >= 0.8.3 && < 0.9,
lens >= 4.18 && < 4.20,
mtl >= 2.2 && < 2.3,
optparse-applicative >= 0.14 && < 0.16,
parsec >= 3.1 && < 4.2,
pcre-simple >= 0.1 && < 0.2,
pem >= 0.2 && < 0.3,
psqueues >= 0.2 && < 0.3,
scientific >= 0.3 && < 0.4,
text >= 1.2 && < 1.3,
time >= 1.8 && < 1.10,
timerep >= 2.0 && < 2.1,
unordered-containers >= 0.2 && < 0.3,
vector >= 0.12.2 && < 0.13,
vector-instances >= 3.4 && < 3.5,
x509 >= 1.7 && < 1.8,
yaml >= 0.11 && < 0.12,
zlib >= 0.6 && < 0.7

Executable fregot
Hs-source-dirs: src/fregot
Expand Down
15 changes: 0 additions & 15 deletions lib/Data/Vector/Extended.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,15 @@ Portability : POSIX
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Data.Vector.Extended
( module Data.Vector
, uncons
, catMaybes
, lookup
, inits
) where

import Data.Vector
import qualified Data.Vector as V
import Data.Vector.Instances ()
import qualified Data.Vector.Mutable as VM
import Prelude hiding (head, length, lookup, null, tail)

uncons :: Vector a -> Maybe (a, Vector a)
uncons vec = if null vec then Nothing else Just (head vec, tail vec)

catMaybes :: Vector (Maybe a) -> Vector a
catMaybes vec0 = create $ do
vec1 <- VM.new (length vec0)
let go !i !j
| i >= length vec0 = return $ VM.take j vec1
| Just x <- vec0 ! i = VM.write vec1 j x >> go (i + 1) (j + 1)
| otherwise = go (i + 1) j
go 0 0

lookup :: Eq k => k -> Vector (k, v) -> Maybe v
lookup k = fmap snd . find ((== k) . fst)

Expand Down
9 changes: 4 additions & 5 deletions stack.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resolver: 'lts-16.9'
resolver: 'lts-17.2'

# Dev options
ghc-options:
Expand All @@ -9,10 +9,9 @@ packages:

extra-deps:
- './packages/pcre-simple'
- 'HsYAML-0.2.1.0'
- 'jose-0.8.3'
- 'vector-0.12.2.0'
- git: https://github.com/fugue/goldplate.git
commit: 0ac9d399eb7bcac810a1bf4d97ccc08fe6f39f39
commit: 131b5b12533ae9bff855a442a8d0d28a6a422fdc

nix:
packages: ["zlib.dev", "zlib.out"]
shell-file: "shell.nix"
33 changes: 13 additions & 20 deletions stack.yaml.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,26 @@

packages:
- completed:
hackage: HsYAML-0.2.1.0@sha256:6e63cbc919543c5a837040f063e96fe0a4e43bef8ab3c057cef8f122396fdc2d,5469
hackage: vector-0.12.2.0@sha256:6e81683c2c19b4aea58f1f453547cb03851b3cfd4031b8eb82abfa4643a13494,7953
pantry-tree:
size: 1340
sha256: 77d9299977dfbc7836cbbcb51fe890bb70d485d9dd89a3bbe54822635faa8108
size: 3841
sha256: 666939d042ad8880bb66f4c00ebe71167354649ed4f1e4ddce99de355921c25e
original:
hackage: HsYAML-0.2.1.0
- completed:
hackage: jose-0.8.3@sha256:8aced915d565f8397150149d46f1f2f2f7ec7aaddf9593f52b420111629332cf,3333
pantry-tree:
size: 1992
sha256: 625c2a7690a0e30f8882f001b6a7fbc88a9cfa686eff5ade81996883795ba0fc
original:
hackage: jose-0.8.3
hackage: vector-0.12.2.0
- completed:
name: goldplate
version: 0.1.0
version: 0.1.3
git: https://github.com/fugue/goldplate.git
pantry-tree:
size: 1917
sha256: fec4e5423b13dac876111ae98867ac102b3d5c225003cd7005da99037204dae4
commit: 0ac9d399eb7bcac810a1bf4d97ccc08fe6f39f39
size: 2232
sha256: 407ac0b5bf03e9bc9ed3a0b09e2bd953c176de807efe4a4452dc0cba95062aa6
commit: 131b5b12533ae9bff855a442a8d0d28a6a422fdc
original:
git: https://github.com/fugue/goldplate.git
commit: 0ac9d399eb7bcac810a1bf4d97ccc08fe6f39f39
commit: 131b5b12533ae9bff855a442a8d0d28a6a422fdc
snapshots:
- completed:
size: 532380
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/16/9.yaml
sha256: 14a7cec114424e4286adde73364438927a553ed248cc50f069a30a67e3ee1e69
original: lts-16.9
size: 563099
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/17/2.yaml
sha256: 92b1a17e31d0a978fca4bf270305d4d1dd8092271bf60eafbc9349c890854026
original: lts-17.2
2 changes: 1 addition & 1 deletion tests/golden/cli/repl-input.stderr
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
F u g u e R E G O T o o l k i t
fregot v0.13.2 repl - use :help for usage info
fregot v0.13.3 repl - use :help for usage info
2 changes: 1 addition & 1 deletion tests/golden/repl/break-data.stderr
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
F u g u e R E G O T o o l k i t
fregot v0.13.2 repl - use :help for usage info
fregot v0.13.3 repl - use :help for usage info
Set breakpoint at step.test_step
2 changes: 1 addition & 1 deletion tests/golden/repl/break-source.stderr
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
F u g u e R E G O T o o l k i t
fregot v0.13.2 repl - use :help for usage info
fregot v0.13.3 repl - use :help for usage info
Set breakpoint at step.rego:5
2 changes: 1 addition & 1 deletion tests/golden/repl/break-unset.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
F u g u e R E G O T o o l k i t
fregot v0.13.2 repl - use :help for usage info
fregot v0.13.3 repl - use :help for usage info
Set breakpoint at step.rego:5
Removed breakpoint at step.rego:5
no breakpoints set
Expand Down
2 changes: 1 addition & 1 deletion tests/golden/repl/debug-cache.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
F u g u e R E G O T o o l k i t
fregot v0.13.2 repl - use :help for usage info
fregot v0.13.3 repl - use :help for usage info
Loading debug-cache.rego...
Loaded package fregot.tests.repl.debug_cache
Set breakpoint at fregot.tests.repl.debug_cache.test_allow
2 changes: 1 addition & 1 deletion tests/golden/repl/debug-context.stderr
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
F u g u e R E G O T o o l k i t
fregot v0.13.2 repl - use :help for usage info
fregot v0.13.3 repl - use :help for usage info
Set breakpoint at debug_context.valid_security_groups
2 changes: 1 addition & 1 deletion tests/golden/repl/debug-error.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
F u g u e R E G O T o o l k i t
fregot v0.13.2 repl - use :help for usage info
fregot v0.13.3 repl - use :help for usage info
Set breakpoint at debug_error.test_crash
fregot (eval error):
"debug-error.rego" (line 5, column 3):
Expand Down
2 changes: 1 addition & 1 deletion tests/golden/repl/debug-noopt.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
F u g u e R E G O T o o l k i t
fregot v0.13.2 repl - use :help for usage info
fregot v0.13.3 repl - use :help for usage info
Loading ../opt/comprehension-index.rego...
Loaded package comprehension_index
Set breakpoint at comprehension_index.exposed_ports_by_interface
Expand Down
2 changes: 1 addition & 1 deletion tests/golden/repl/debug-opt.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
F u g u e R E G O T o o l k i t
fregot v0.13.2 repl - use :help for usage info
fregot v0.13.3 repl - use :help for usage info
Loading ../opt/comprehension-index.rego...
Loaded package comprehension_index
Set breakpoint at comprehension_index.exposed_ports_by_interface
Expand Down
2 changes: 1 addition & 1 deletion tests/golden/repl/debug-reload.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
F u g u e R E G O T o o l k i t
fregot v0.13.2 repl - use :help for usage info
fregot v0.13.3 repl - use :help for usage info
Rule rule added
Set breakpoint at repl.rule
Reloading when debugging is not possible as it would modify the code currently running.
2 changes: 1 addition & 1 deletion tests/golden/repl/help.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
F u g u e R E G O T o o l k i t
fregot v0.13.2 repl - use :help for usage info
fregot v0.13.3 repl - use :help for usage info
Enter an expression to evaluate it.
Enter a rule to add it to the current package.

Expand Down
2 changes: 1 addition & 1 deletion tests/golden/repl/input-doc.stderr
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
F u g u e R E G O T o o l k i t
fregot v0.13.2 repl - use :help for usage info
fregot v0.13.3 repl - use :help for usage info
2 changes: 1 addition & 1 deletion tests/golden/repl/input-yaml.stderr
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
F u g u e R E G O T o o l k i t
fregot v0.13.2 repl - use :help for usage info
fregot v0.13.3 repl - use :help for usage info
2 changes: 1 addition & 1 deletion tests/golden/repl/load-data.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
F u g u e R E G O T o o l k i t
fregot v0.13.2 repl - use :help for usage info
fregot v0.13.3 repl - use :help for usage info
Loading data.yaml...
OK
2 changes: 1 addition & 1 deletion tests/golden/repl/load.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
F u g u e R E G O T o o l k i t
fregot v0.13.2 repl - use :help for usage info
fregot v0.13.3 repl - use :help for usage info
Loading load.rego...
Loaded package fregot.tests.repl.load
2 changes: 1 addition & 1 deletion tests/golden/repl/open.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
F u g u e R E G O T o o l k i t
fregot v0.13.2 repl - use :help for usage info
fregot v0.13.3 repl - use :help for usage info
Warning: package mypkg1 contains no rules
Rule r added
Warning: package mypkg2 contains no rules
Expand Down
2 changes: 1 addition & 1 deletion tests/golden/repl/plain-call.stderr
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
F u g u e R E G O T o o l k i t
fregot v0.13.2 repl - use :help for usage info
fregot v0.13.3 repl - use :help for usage info
2 changes: 1 addition & 1 deletion tests/golden/repl/prefix-data.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
F u g u e R E G O T o o l k i t
fregot v0.13.2 repl - use :help for usage info
fregot v0.13.3 repl - use :help for usage info
Loading prefix-data.json...
OK
2 changes: 1 addition & 1 deletion tests/golden/repl/pretty.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
F u g u e R E G O T o o l k i t
fregot v0.13.2 repl - use :help for usage info
fregot v0.13.3 repl - use :help for usage info
Loading pretty.rego...
Loaded package pretty
2 changes: 1 addition & 1 deletion tests/golden/repl/rewind.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
F u g u e R E G O T o o l k i t
fregot v0.13.2 repl - use :help for usage info
fregot v0.13.3 repl - use :help for usage info
Set breakpoint at rewind.crashing_rule
fregot (eval error):
"rewind.rego" (line 5, column 3):
Expand Down
2 changes: 1 addition & 1 deletion tests/golden/repl/set.stderr
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
F u g u e R E G O T o o l k i t
fregot v0.13.2 repl - use :help for usage info
fregot v0.13.3 repl - use :help for usage info
2 changes: 1 addition & 1 deletion tests/golden/repl/silent.stderr
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
F u g u e R E G O T o o l k i t
fregot v0.13.2 repl - use :help for usage info
fregot v0.13.3 repl - use :help for usage info
2 changes: 1 addition & 1 deletion tests/golden/repl/step-into.stderr
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
F u g u e R E G O T o o l k i t
fregot v0.13.2 repl - use :help for usage info
fregot v0.13.3 repl - use :help for usage info
Set breakpoint at step.test_step
2 changes: 1 addition & 1 deletion tests/golden/repl/step-over.stderr
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
F u g u e R E G O T o o l k i t
fregot v0.13.2 repl - use :help for usage info
fregot v0.13.3 repl - use :help for usage info
Set breakpoint at step.test_step
2 changes: 1 addition & 1 deletion tests/golden/repl/test.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
F u g u e R E G O T o o l k i t
fregot v0.13.2 repl - use :help for usage info
fregot v0.13.3 repl - use :help for usage info
Loading test.rego...
Loaded package fregot.tests.repl.test
2 changes: 1 addition & 1 deletion tests/golden/repl/watch-input.stderr
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
F u g u e R E G O T o o l k i t
fregot v0.13.2 repl - use :help for usage info
fregot v0.13.3 repl - use :help for usage info
Reloaded watch-input-2.json
2 changes: 1 addition & 1 deletion tests/golden/repl/watch-warn.stderr
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
F u g u e R E G O T o o l k i t
fregot v0.13.2 repl - use :help for usage info
fregot v0.13.3 repl - use :help for usage info
Restart the with `--watch` to enable watching.
2 changes: 1 addition & 1 deletion tests/golden/types/comprehensions.stderr
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
F u g u e R E G O T o o l k i t
fregot v0.13.2 repl - use :help for usage info
fregot v0.13.3 repl - use :help for usage info
2 changes: 1 addition & 1 deletion tests/golden/types/granular.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
F u g u e R E G O T o o l k i t
fregot v0.13.2 repl - use :help for usage info
fregot v0.13.3 repl - use :help for usage info
Loading granular.rego...
Loaded package granular
2 changes: 1 addition & 1 deletion tests/golden/types/rules.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
F u g u e R E G O T o o l k i t
fregot v0.13.2 repl - use :help for usage info
fregot v0.13.3 repl - use :help for usage info
Loading rules.rego...
Loaded package rules

0 comments on commit c734f5a

Please sign in to comment.