From e926340dbffdd2271fecb6003a43c54f34adf8e9 Mon Sep 17 00:00:00 2001 From: Ian-Woo Kim Date: Fri, 16 Dec 2022 17:03:01 -0800 Subject: [PATCH] Release 0.7.0.0 (#206) * use Cabal-Version: 3.0, and bump up to 0.7.0.0 * correct LICENSE: BSD-2-Clause * update nixpkgs * made changelog stub * add contents to ChangeLog. based on the PR history. * update tested-with * fix BSD3 --- build-tools/fficxx-build-tools.cabal | 2 +- .../fficxx-multipkg-test.cabal | 6 +- .../tmpl-dup-inst/tmpl-dup-inst.cabal | 4 +- fficxx-runtime/ChangeLog.md | 62 +++++++++++++++++++ fficxx-runtime/LICENSE | 2 +- fficxx-runtime/fficxx-runtime.cabal | 10 +-- fficxx-test/fficxx-test.cabal | 6 +- fficxx/ChangeLog.md | 62 +++++++++++++++++++ fficxx/LICENSE | 2 +- fficxx/fficxx.cabal | 9 ++- fficxx/src/FFICXX/Generate/Code/Cabal.hs | 8 +-- flake.lock | 8 +-- flake.nix | 4 +- stdcxx-gen/Gen.hs | 4 +- 14 files changed, 158 insertions(+), 31 deletions(-) create mode 100644 fficxx-runtime/ChangeLog.md create mode 100644 fficxx/ChangeLog.md diff --git a/build-tools/fficxx-build-tools.cabal b/build-tools/fficxx-build-tools.cabal index 365f257f..435f1607 100644 --- a/build-tools/fficxx-build-tools.cabal +++ b/build-tools/fficxx-build-tools.cabal @@ -1,4 +1,4 @@ -cabal-version: 2.4 +cabal-version: 3.0 name: fficxx-build-tools version: 0.1.0.0 diff --git a/fficxx-multipkg-test/fficxx-multipkg-test.cabal b/fficxx-multipkg-test/fficxx-multipkg-test.cabal index 41ce9f24..9b941863 100644 --- a/fficxx-multipkg-test/fficxx-multipkg-test.cabal +++ b/fficxx-multipkg-test/fficxx-multipkg-test.cabal @@ -1,14 +1,14 @@ +Cabal-Version: 3.0 Name: fficxx-multipkg-test -Version: 0.6 +Version: 0.0 Synopsis: test for fficxx Description: test for fficxx (with stdcxx) -License: BSD3 +License: BSD-2-Clause License-file: LICENSE Author: Ian-Woo Kim Maintainer: Ian-Woo Kim Build-Type: Simple Category: FFI Tools -Cabal-Version: >= 1.8 Source-repository head type: git diff --git a/fficxx-multipkg-test/tmpl-dup-inst/tmpl-dup-inst.cabal b/fficxx-multipkg-test/tmpl-dup-inst/tmpl-dup-inst.cabal index f00b04a5..427dcb00 100644 --- a/fficxx-multipkg-test/tmpl-dup-inst/tmpl-dup-inst.cabal +++ b/fficxx-multipkg-test/tmpl-dup-inst/tmpl-dup-inst.cabal @@ -1,14 +1,14 @@ +Cabal-Version: 3.0 Name: tmpl-dup-inst Version: 0.0 Synopsis: test for fficxx template instatiation duplication Description: test for fficxx template instatiation duplication -License: BSD3 +License: BSD-2-Clause License-file: LICENSE Author: Ian-Woo Kim Maintainer: Ian-Woo Kim Build-Type: Simple Category: FFI Tools -Cabal-Version: >= 1.8 Source-repository head type: git diff --git a/fficxx-runtime/ChangeLog.md b/fficxx-runtime/ChangeLog.md new file mode 100644 index 00000000..f849de61 --- /dev/null +++ b/fficxx-runtime/ChangeLog.md @@ -0,0 +1,62 @@ +# Changelog for fficxx-runtime + +## 0.7.0.0 + +- Show generated module dependency graph (#203) +- Fix incorrect hs-boot (#199) +- Simplify Nix script and support for multiple GHC versions in build (#196) +- aarch64-darwin support (#195) +- Implicit imports cleanup (#193) +- Upgrade to NixOS 21.11. (#192) +- CI action for ormolu formatting (#190) +- github action CI with nix build targets (#189) +- format all Haskell files by ormolu 0.0.3 (#180) + + +## 0.6 + +- no more impure (#178) +- Duplicated template instances are safe (#176) +- Update for haskell-src-exts >= 1.22 (#174) +- change to_const/to_nonconst to from_X_to_Y (#172) +- std::map::iterator is now supported. (#168) +- accessor for member variables of C++ template (#167) +- Support nested types inside template class (#163) +- Automatic dependency import in template class module (#162) +- cabal package generation and testing using hspec (#159) +- fficxx-test: stdcxx tests are rewritten as hspec tests (#158) +- multi-parameter template for function arguments and template member functions (#156) +- C++ multi-parameter template interfaced via fficxx! (#154) +- one class or template class per one haskell module! (#151) +- Inline C++ code generation for template member function (#149) +- Inline C++ code generation for std::function (#148) +- CDefinition. Unified newline treatment in Macro definition (#143) +- More ASTification with CMacroApp (#141) +- Declaration generation uses intermediate pseudo-AST representation (#140) +- Further towards intermediate reps for C++ code generation (#139) +- Further removing #include and using namespace (#138) +- Start C intermediate rep (#137) +- Convert (Types,String) to Arg (#134) +- no more stub.cc (#132) + +## 0.5.1 + +## 0.5.0.1 + +## 0.5 + +## 0.4.1 + +## 0.4 + +## 0.3.1 + +## 0.3 + +## 0.2.1 + +## 0.2 + +## 0.1.0 + +## 0.1 diff --git a/fficxx-runtime/LICENSE b/fficxx-runtime/LICENSE index a6d94e2f..2165943d 100644 --- a/fficxx-runtime/LICENSE +++ b/fficxx-runtime/LICENSE @@ -1,7 +1,7 @@ The following license covers this documentation, and the source code, except where otherwise indicated. -Copyright 2011-2019, Ian-Woo Kim. All rights reserved. +Copyright 2011-2022, Ian-Woo Kim. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/fficxx-runtime/fficxx-runtime.cabal b/fficxx-runtime/fficxx-runtime.cabal index af648160..d182acc4 100644 --- a/fficxx-runtime/fficxx-runtime.cabal +++ b/fficxx-runtime/fficxx-runtime.cabal @@ -1,16 +1,18 @@ +Cabal-Version: 3.0 Name: fficxx-runtime -Version: 0.6.999 +Version: 0.7.0.0 Synopsis: Runtime for fficxx-generated library Description: Runtime for fficxx-generated library. fficxx is an automatic haskell Foreign Function Interface (FFI) generator to C++. -License: BSD3 +License: BSD-2-Clause License-file: LICENSE Author: Ian-Woo Kim Maintainer: Ian-Woo Kim Build-Type: Simple +Tested-With: GHC == 9.0.2 || == 9.2.4 || == 9.4.2 Category: FFI Tools -Cabal-Version: >= 1.10 -Data-files: +Extra-Source-Files: + ChangeLog.md Source-repository head type: git diff --git a/fficxx-test/fficxx-test.cabal b/fficxx-test/fficxx-test.cabal index 0c8660e3..d749f364 100644 --- a/fficxx-test/fficxx-test.cabal +++ b/fficxx-test/fficxx-test.cabal @@ -1,14 +1,14 @@ +Cabal-Version: 3.0 Name: fficxx-test -Version: 0.6 +Version: 0.7.0.0 Synopsis: test for fficxx Description: test for fficxx (with stdcxx) -License: BSD3 +License: BSD-2-Clause License-file: LICENSE Author: Ian-Woo Kim Maintainer: Ian-Woo Kim Build-Type: Simple Category: FFI Tools -Cabal-Version: >= 1.8 Source-repository head type: git diff --git a/fficxx/ChangeLog.md b/fficxx/ChangeLog.md new file mode 100644 index 00000000..c8a32a38 --- /dev/null +++ b/fficxx/ChangeLog.md @@ -0,0 +1,62 @@ +# Changelog for fficxx + +## 0.7.0.0 + +- Show generated module dependency graph (#203) +- Fix incorrect hs-boot (#199) +- Simplify Nix script and support for multiple GHC versions in build (#196) +- aarch64-darwin support (#195) +- Implicit imports cleanup (#193) +- Upgrade to NixOS 21.11. (#192) +- CI action for ormolu formatting (#190) +- github action CI with nix build targets (#189) +- format all Haskell files by ormolu 0.0.3 (#180) + + +## 0.6 + +- no more impure (#178) +- Duplicated template instances are safe (#176) +- Update for haskell-src-exts >= 1.22 (#174) +- change to_const/to_nonconst to from_X_to_Y (#172) +- std::map::iterator is now supported. (#168) +- accessor for member variables of C++ template (#167) +- Support nested types inside template class (#163) +- Automatic dependency import in template class module (#162) +- cabal package generation and testing using hspec (#159) +- fficxx-test: stdcxx tests are rewritten as hspec tests (#158) +- multi-parameter template for function arguments and template member functions (#156) +- C++ multi-parameter template interfaced via fficxx! (#154) +- one class or template class per one haskell module! (#151) +- Inline C++ code generation for template member function (#149) +- Inline C++ code generation for std::function (#148) +- CDefinition. Unified newline treatment in Macro definition (#143) +- More ASTification with CMacroApp (#141) +- Declaration generation uses intermediate pseudo-AST representation (#140) +- Further towards intermediate reps for C++ code generation (#139) +- Further removing #include and using namespace (#138) +- Start C intermediate rep (#137) +- Convert (Types,String) to Arg (#134) +- no more stub.cc (#132) + +## 0.5.1 + +## 0.5.0.1 + +## 0.5 + +## 0.4.1 + +## 0.4 + +## 0.3.1 + +## 0.3 + +## 0.2.1 + +## 0.2 + +## 0.1.0 + +## 0.1 diff --git a/fficxx/LICENSE b/fficxx/LICENSE index a6d94e2f..2165943d 100644 --- a/fficxx/LICENSE +++ b/fficxx/LICENSE @@ -1,7 +1,7 @@ The following license covers this documentation, and the source code, except where otherwise indicated. -Copyright 2011-2019, Ian-Woo Kim. All rights reserved. +Copyright 2011-2022, Ian-Woo Kim. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/fficxx/fficxx.cabal b/fficxx/fficxx.cabal index a6d7d524..52e38d6e 100644 --- a/fficxx/fficxx.cabal +++ b/fficxx/fficxx.cabal @@ -1,14 +1,17 @@ +Cabal-Version: 3.0 Name: fficxx -Version: 0.6.999 +Version: 0.7.0.0 Synopsis: Automatic C++ binding generation Description: fficxx is an automatic haskell Foreign Function Interface (FFI) generator to C++. -License: BSD3 +License: BSD-2-Clause License-file: LICENSE Author: Ian-Woo Kim Maintainer: Ian-Woo Kim Build-Type: Simple +Tested-With: GHC == 9.0.2 || == 9.2.4 || == 9.4.2 Category: FFI Tools -Cabal-Version: >= 1.10 +Extra-Source-Files: + ChangeLog.md Source-repository head type: git diff --git a/fficxx/src/FFICXX/Generate/Code/Cabal.hs b/fficxx/src/FFICXX/Generate/Code/Cabal.hs index 2f5e67a2..9d62d116 100644 --- a/fficxx/src/FFICXX/Generate/Code/Cabal.hs +++ b/fficxx/src/FFICXX/Generate/Code/Cabal.hs @@ -130,8 +130,8 @@ genOtherModules _cmods = [""] genPkgDeps :: [CabalName] -> [String] genPkgDeps cs = [ "base > 4 && < 5", - "fficxx >= 0.5", - "fficxx-runtime >= 0.5", + "fficxx >= 0.7", + "fficxx-runtime >= 0.7", "template-haskell" ] ++ map unCabalName cs @@ -139,7 +139,7 @@ genPkgDeps cs = -- | cabalTemplate :: Text cabalTemplate = - "Cabal-version: 2.2\n\ + "Cabal-version: 3.0\n\ \Name: $pkgname\n\ \Version: $version\n\ \Synopsis: $synopsis\n\ @@ -150,7 +150,7 @@ cabalTemplate = \Author: $author\n\ \Maintainer: $maintainer\n\ \Category: $category\n\ - \Tested-with: GHC >= 7.6\n\ + \Tested-with: GHC == 9.0.2 || == 9.2.4 || == 9.4.2 \n\ \$buildtype\n\ \Extra-source-files:\n\ \$extraFiles\n\ diff --git a/flake.lock b/flake.lock index e98e8db2..d8542d3f 100644 --- a/flake.lock +++ b/flake.lock @@ -17,17 +17,17 @@ }, "nixpkgs": { "locked": { - "lastModified": 1666371646, - "narHash": "sha256-gLaVWLbbig3MjLbb2NzVzWe4XK8w/Qw7iJdD0u1dzDY=", + "lastModified": 1671220433, + "narHash": "sha256-j+sC1XLEwEHUgMdu4FuSWedlO/BMC4gWUQ6hvzRCWrs=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "71c5816834f93840dd301ec384c9d7947e97c27d", + "rev": "093ec6f77bf9a3de6421952d116ea05c9d80f6e5", "type": "github" }, "original": { "owner": "NixOS", + "ref": "master", "repo": "nixpkgs", - "rev": "71c5816834f93840dd301ec384c9d7947e97c27d", "type": "github" } }, diff --git a/flake.nix b/flake.nix index c3d29b34..00d4f814 100644 --- a/flake.nix +++ b/flake.nix @@ -1,9 +1,7 @@ { description = "fficxx"; inputs = { - # nixpkgs/master on 2022-10-21 - nixpkgs.url = - "github:NixOS/nixpkgs/71c5816834f93840dd301ec384c9d7947e97c27d"; + nixpkgs.url = "github:NixOS/nixpkgs/master"; flake-utils.url = "github:numtide/flake-utils"; }; outputs = { self, nixpkgs, flake-utils }: diff --git a/stdcxx-gen/Gen.hs b/stdcxx-gen/Gen.hs index d97fed63..c08e372b 100644 --- a/stdcxx-gen/Gen.hs +++ b/stdcxx-gen/Gen.hs @@ -57,13 +57,13 @@ cabal :: Cabal cabal = Cabal { cabal_pkgname = CabalName "stdcxx", - cabal_version = "0.6.999", + cabal_version = "0.7.0.0", cabal_cheaderprefix = "STD", cabal_moduleprefix = "STD", cabal_additional_c_incs = [], cabal_additional_c_srcs = [], cabal_additional_pkgdeps = [], - cabal_license = Just "BSD-3-Clause", + cabal_license = Just "BSD-2-Clause", cabal_licensefile = Just "LICENSE", cabal_extraincludedirs = [], cabal_extralibdirs = [],