Skip to content

Implement SQLCommenter support #176

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ packages:
, instrumentation/yesod
, instrumentation/wai
, utils/exceptions
, utils/sqlcommenter
, vendors/honeycomb

allow-newer:
Expand Down
2 changes: 2 additions & 0 deletions stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ packages:
- instrumentation/tasty
- instrumentation/yesod
- instrumentation/wai
- utils/exceptions
- utils/sqlcommenter
- examples/hspec
- examples/yesod-minimal

Expand Down
11 changes: 11 additions & 0 deletions utils/sqlcommenter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Changelog for `sqlcommenter`

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to the
[Haskell Package Versioning Policy](https://pvp.haskell.org/).

## Unreleased

## 0.1.0.0 - YYYY-MM-DD
26 changes: 26 additions & 0 deletions utils/sqlcommenter/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Copyright 2024 Ian Duncan

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1 change: 1 addition & 0 deletions utils/sqlcommenter/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# sqlcommenter
2 changes: 2 additions & 0 deletions utils/sqlcommenter/Setup.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import Distribution.Simple
main = defaultMain
64 changes: 64 additions & 0 deletions utils/sqlcommenter/package.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: sqlcommenter
version: 0.1.0.0
github: "iand675/hs-opentelemetry"
license: BSD-3-Clause
author: "Ian Duncan"
maintainer: "[email protected]"
copyright: "2024 Ian Duncan"

extra-source-files:
- README.md
- CHANGELOG.md

# Metadata used when publishing your package
# synopsis: Short description of your package
# category: Web

# To avoid duplicated efforts in documentation and dealing with the
# complications of embedding Haddock markup inside cabal files, it is
# common to point users to the README.md file.
description: Please see the README on GitHub at <https://github.com/githubuser/sqlcommenter#readme>

dependencies:
- base >= 4.7 && < 5
- bytestring
- text >= 2.0 && < 2.2
- attoparsec
- containers
- hs-opentelemetry-api
- hs-opentelemetry-propagator-w3c
- hedgehog
- http-types

ghc-options:
- -Wall
- -Wcompat
- -Widentities
- -Wincomplete-record-updates
- -Wincomplete-uni-patterns
- -Wmissing-export-lists
- -Wmissing-home-modules
- -Wpartial-fields
- -Wredundant-constraints

library:
source-dirs: src

tests:
sqlcommenter-test:
main: Spec.hs
source-dirs: test
ghc-options:
- -threaded
- -rtsopts
- -with-rtsopts=-N
dependencies:
- sqlcommenter
- bytestring
- text
- containers
- hspec
- hspec-hedgehog
- hedgehog
- http-types
- hs-opentelemetry-api
71 changes: 71 additions & 0 deletions utils/sqlcommenter/sqlcommenter.cabal
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
cabal-version: 2.2

-- This file has been generated from package.yaml by hpack version 0.35.5.
--
-- see: https://github.com/sol/hpack

name: sqlcommenter
version: 0.1.0.0
description: Please see the README on GitHub at <https://github.com/githubuser/sqlcommenter#readme>
homepage: https://github.com/iand675/hs-opentelemetry#readme
bug-reports: https://github.com/iand675/hs-opentelemetry/issues
author: Ian Duncan
maintainer: [email protected]
copyright: 2024 Ian Duncan
license: BSD-3-Clause
license-file: LICENSE
build-type: Simple
extra-source-files:
README.md
CHANGELOG.md

source-repository head
type: git
location: https://github.com/iand675/hs-opentelemetry

library
exposed-modules:
SqlCommenter
other-modules:
Paths_sqlcommenter
autogen-modules:
Paths_sqlcommenter
hs-source-dirs:
src
ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wmissing-export-lists -Wmissing-home-modules -Wpartial-fields -Wredundant-constraints
build-depends:
attoparsec
, base >=4.7 && <5
, bytestring
, containers
, hedgehog
, hs-opentelemetry-api
, hs-opentelemetry-propagator-w3c
, http-types
, text >=2.0 && <2.2
default-language: Haskell2010

test-suite sqlcommenter-test
type: exitcode-stdio-1.0
main-is: Spec.hs
other-modules:
Paths_sqlcommenter
autogen-modules:
Paths_sqlcommenter
hs-source-dirs:
test
ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wmissing-export-lists -Wmissing-home-modules -Wpartial-fields -Wredundant-constraints -threaded -rtsopts -with-rtsopts=-N
build-depends:
attoparsec
, base >=4.7 && <5
, bytestring
, containers
, hedgehog
, hs-opentelemetry-api
, hs-opentelemetry-propagator-w3c
, hspec
, hspec-hedgehog
, http-types
, sqlcommenter
, text
default-language: Haskell2010
Loading