-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
With `Cabal-2.0` and later, put the autogenerated modules of each component (library, executables, tests, benchmarks) in their own directory. This eliminates some confusing warnings and/or build errors. (Note: this required a change to the release script for generating sdists; long-term we should replace it with something like #185.) With `Cabal-1.*`, continue to put all autogenerated modules together in the same directory. An example of the previous issue, when an executable depended on a library in the same `.cabal` file and the library provided proto modules: ``` <no location info>: warning: [-Wmissing-home-modules] These modules are needed for compilation but not listed in your .cabal file's other-modules: Proto.Lib ```
- Loading branch information
Showing
8 changed files
with
153 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
syntax = "proto3"; | ||
|
||
import "lib.proto"; | ||
|
||
package dependent; | ||
|
||
message Dependent { | ||
lib.LibMessage x = 1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
module Main (main) where | ||
|
||
import Data.ProtoLens (def) | ||
import Test.Framework (defaultMain) | ||
import Test.Framework.Providers.HUnit (testCase) | ||
import Test.HUnit ((@=?)) | ||
|
||
import Proto.Dependent (Dependent) | ||
import Proto.Lib (LibMessage) | ||
|
||
main :: IO () | ||
main = defaultMain | ||
[ testCase "LibMessage" $ (def :: LibMessage) @=? def | ||
, testCase "Dependent" $ (def :: Dependent) @=? def | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
syntax = "proto3"; | ||
|
||
package lib; | ||
|
||
message LibMessage {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters