Skip to content

Commit 8b4241e

Browse files
authored
Merge pull request #105 from input-output-hk/lehins/fix-stackage-nightly
Fix stackage nightly
2 parents f22cfd1 + 744a73e commit 8b4241e

File tree

4 files changed

+16
-13
lines changed

4 files changed

+16
-13
lines changed

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22

33
Cuddle is a library for generating and manipulating [CDDL](https://datatracker.ietf.org/doc/html/rfc8610).
44

5-
<p align="center">
6-
<a href="https://github.com/input-output-hk/cuddle/actions/workflows/ci.yml">
7-
<img alt="GitHub Workflow Status (master)" src="https://img.shields.io/github/actions/workflow/status/input-output-hk/cuddle/ci.yml?branch=master&style=for-the-badge" />
8-
</a>
9-
</p>
5+
| Language | Github Actions | Coveralls |
6+
|:--------:|:--------------:|:---------:|
7+
| ![GitHub top language](https://img.shields.io/github/languages/top/input-output-hk/cuddle.svg) | [![Build Status](https://github.com/input-output-hk/cuddle/actions/workflows/ci.yaml/badge.svg?branch=master)](https://github.com/input-output-hk/cuddle/actions/workflows/ci.yaml) | [![Coverage Status](https://coveralls.io/repos/github/input-output-hk/cuddle/badge.svg?branch=master)](https://coveralls.io/github/input-output-hk/cuddle?branch=master)
8+
9+
| Github Repo | Hackage | Nightly | LTS |
10+
|:-------------------|:-------:|:-------:|:---:|
11+
| [`cuddle`](https://github.com/input-output-hk/cuddle)| [![Hackage](https://img.shields.io/hackage/v/cuddle.svg)](https://hackage.haskell.org/package/cuddle)| [![Nightly](https://www.stackage.org/package/cuddle/badge/nightly)](https://www.stackage.org/nightly/package/cuddle)| [![LTS](https://www.stackage.org/package/cuddle/badge/lts)](https://www.stackage.org/lts/package/cuddle)
1012

1113
## Supported features
1214

cuddle.cabal

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cabal-version: 3.4
22
name: cuddle
3-
version: 1.0.0.0
3+
version: 1.1.0.0
44
synopsis: CDDL Generator and test utilities
55
description:
66
Cuddle is a library for generating and manipulating [CDDL](https://datatracker.ietf.org/doc/html/rfc8610).
@@ -22,16 +22,14 @@ category: Codec
2222
build-type: Simple
2323
extra-doc-files: CHANGELOG.md
2424
tested-with: ghc ==9.6 || ==9.8 || ==9.10 || ==9.12
25+
data-files:
26+
example/cddl-files/*.cddl
27+
example/cddl-files/validator/negative/*.cddl
2528

2629
source-repository head
2730
type: git
2831
location: https://github.com/input-output-hk/cuddle
2932

30-
source-repository this
31-
type: git
32-
location: https://github.com/input-output-hk/cuddle
33-
tag: cuddle-0.5.0.0
34-
3533
flag example
3634
description: Enable the example executable
3735
manual: True
@@ -134,6 +132,7 @@ test-suite cuddle-test
134132
import: warnings
135133
default-language: GHC2021
136134
other-modules:
135+
Paths_cuddle
137136
Test.Codec.CBOR.Cuddle.CDDL.Examples
138137
Test.Codec.CBOR.Cuddle.CDDL.Gen
139138
Test.Codec.CBOR.Cuddle.CDDL.Parser

stack.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ system-ghc: true
33
packages:
44
- .
55
extra-deps:
6-
- capability-0.5.0.1@sha256:3b3fa095891573bbdff854bf8351c3fcfa986d502c8071a2e4a2686ff3819302,3287
6+
- capability-0.5.0.1@sha256:fa45f434f7c908fc98311306c26d2d9286a244193b6dd4e97a4e228a9f6119bf,3287
77
- data-default-class-0.2.0.0@sha256:788dc5c0be3981ca83ad11206e300a77ae8a1c8b9bc4f9630f563d37f540ccbd,728
88
- data-default-0.8.0.1@sha256:536ff91641a39b8ad302eebceff767d86ec6b543b44b1db9104650a2b1bc63bd,1110

test/Test/Codec/CBOR/Cuddle/CDDL/Examples.hs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,16 @@ import Codec.CBOR.Cuddle.CDDL.Resolve (
1313
)
1414
import Codec.CBOR.Cuddle.Parser (pCDDL)
1515
import Data.Text.IO qualified as T
16+
import Paths_cuddle (getDataFileName)
1617
import Test.HUnit (assertFailure)
1718
import Test.Hspec
1819
import Text.Megaparsec (parse)
1920
import Text.Megaparsec.Error (errorBundlePretty)
2021

2122
tryValidateFile :: FilePath -> IO (Either NameResolutionFailure (CTreeRoot MonoReferenced))
2223
tryValidateFile filePath = do
23-
contents <- T.readFile filePath
24+
absoluteFilePath <- getDataFileName filePath
25+
contents <- T.readFile absoluteFilePath
2426
cddl <- case parse pCDDL "" contents of
2527
Right x -> pure $ prependPrelude x
2628
Left x -> fail $ "Failed to parse the file:\n" <> errorBundlePretty x

0 commit comments

Comments
 (0)