This repository has been archived by the owner on Nov 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
[#1] Add first protocol buffers message and print its serialization to terminal #3
Merged
Merged
Changes from 11 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
48bc1a4
Add protobuf file with very simple message issue #1
TejasSC b07416c
Edit proto-route.cabal and add Setup.hs files issue #1
TejasSC 20a3643
Encounter errors with Haskell file generation issue #1
TejasSC c2447f0
Attempt to fix .hs file generation errors with stack issue #1
TejasSC 872a15c
Resolve error in generating haskell files issue #1
TejasSC 9f1680b
Create value of generated message and print to console issue #1
TejasSC e6a6914
Print serialized representation issue #1
TejasSC 725e28b
Encounter errors in ghci representation issue #1
TejasSC 39182bf
Resolve errors in ghci representation issue #1
TejasSC 58b5d72
Refactor files to improve further modularity issue #1
TejasSC 6938deb
Modify ChangeLog.md to include links issue #1
TejasSC 9732ba9
Re-modify ChangeLog.md to include links issue #1
TejasSC File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,7 @@ | ||
Change log | ||
# Changelog for proto-route | ||
========== | ||
|
||
proto-route uses [PVP Versioning][1]. | ||
The change log is available [on GitHub][2]. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [...][1] or [...][2] should point to some links. But links are missing in this file. |
||
|
||
0.0.0 | ||
===== | ||
* Initially created. | ||
|
||
[1]: https://pvp.haskell.org | ||
[2]: https://github.com/holmusk/proto-route/releases | ||
|
||
[PVP Versioning]: https://pvp.haskell.org/ | ||
[on GitHub]: https://github.com/Holmusk/proto-route/blob/master/CHANGELOG.md | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unfortunately, this won't work 😞 The initial content of |
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 |
---|---|---|
|
@@ -2,9 +2,3 @@ | |
|
||
[![Hackage](https://img.shields.io/hackage/v/proto-route.svg)](https://hackage.haskell.org/package/proto-route) | ||
[![MIT license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/holmusk/proto-route/blob/master/LICENSE) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The previous content of README file also can be returned back |
||
|
||
|
||
|
||
|
||
Remote testing tool for protobuf endpoints | ||
|
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,3 @@ | ||
import Data.ProtoLens.Setup (defaultMainGeneratingProtos) | ||
|
||
main = defaultMainGeneratingProtos "proto" |
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 |
---|---|---|
@@ -1,7 +1,6 @@ | ||
module Main where | ||
|
||
import ProtoRoute (someFunc) | ||
import qualified ProtoRoute | ||
|
||
main :: IO () | ||
main = someFunc | ||
|
||
main = ProtoRoute.main |
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,5 @@ | ||
syntax = "proto2"; | ||
|
||
message SearchRequest { | ||
required string query = 1; | ||
} |
This file was deleted.
Oops, something went wrong.
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,7 @@ | ||
module ProtoExports | ||
( module Proto.Protobuf1 | ||
, module Proto.Protobuf1_Fields | ||
) where | ||
|
||
import Proto.Protobuf1 | ||
import Proto.Protobuf1_Fields |
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 |
---|---|---|
@@ -1,7 +1,22 @@ | ||
module ProtoRoute | ||
( someFunc | ||
( main | ||
) where | ||
|
||
someFunc :: IO () | ||
someFunc = putStrLn ("someFunc" :: String) | ||
import Language.Haskell.Ghcid (execStream, startGhci, stopGhci) | ||
import System.Directory (getCurrentDirectory) | ||
|
||
main :: IO () | ||
main = do | ||
let f = \_ s -> putStrLn s | ||
curDir <- getCurrentDirectory | ||
(g, _) <- startGhci "ghci" (Just curDir) f | ||
let execStatement s = execStream g s f | ||
execStatement "import Data.Text" | ||
execStatement "import Data.ProtoLens.Encoding" | ||
execStatement ":load src/ProtoExports" | ||
execStatement "let sr = SearchRequest {_SearchRequest'query = pack \"test\"\ | ||
\, _SearchRequest'_unknownFields = ([])}" | ||
-- Value of generated msg, and its serialized representation | ||
execStatement "sr" | ||
execStatement "encodeMessage sr" | ||
stopGhci g |
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,4 @@ | ||
resolver: lts-12.6 | ||
|
||
extra-deps: | ||
- base-noprelude-4.10.1.0 |
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,2 @@ | ||
main :: IO () | ||
main = putStrLn "Test suite not yet implemented" |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's actually useful to keep previous content of changelog file.