forked from webrpc/webrpc
-
Notifications
You must be signed in to change notification settings - Fork 0
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
webrpc update from head #11
Open
kipply
wants to merge
164
commits into
cohere-ai:master
Choose a base branch
from
webrpc:master
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
TSLint has been the recommended linter in the past but now TSLint is deprecated and ESLint is taking over its duties. from https://code.visualstudio.com/api/advanced-topics/tslint-eslint-migration
|
Remove binary file from the source code
* Exploring Templates functions API * Implement "dict", "set" and "get" dictionary funcs for templates This will help us define type mapping in templates * Re-add some v0.6.0 functions for now * Refactor dict function, so we can pass it down to sub-templates * Add type helper funcmaps * Implement isBaseType function * Bring back some obsolete functions to keep generators v0.6.0 working * make diff * Fix the tests for now * Fix go.mod after git cherry-pick * Pass variables to templates via CLI -Flags, add error/fatal funcmaps * Remove gofmt/goimports for now * Implement printfStderr and exit funcs * Move VERSION to gen/ package, expose it as {{.WebrpcGenVersion}} * Expose {{.WebrpcTarget}} and {{.WebrpcGenCLI}} * Remove generator specific tests Each generator repo should be testing the schema/output on its own * Improve and document the template variables * Support old -client, -server and -pkg flags * Remove bunch of golang-specific funcmaps * Fix tests * Remove go-specific funcmaps for method inputs/outputs/arguments * Resolve rebase * Print "custom" target in case of local dir * Remove more go-specific funcmaps; rename "first" to "coalesce" * Gen: Remove all Go-spefific funcmaps/code * Remove last go-specific funcmaps * README: Table of generators * Remove "indent" and rename "stderrPrintf" * webrpc-gen: Return early when writing to stdout * webrpc-gen: Print fatal errors to stderr Otherwise the errors potentially ended up in the generated output file. * Execute "main" template as the required generator entrypoint * Add documentation about generator templates * Generator docs: Document schema object and add TOC * Document template functions * Implement minVersion function * Markdown: Escape column character in a table row * Document requiring webrpc-gen version from templates * Improve error message by naming the template after its target * Collect flags in its own function * Implement "default" function * Add "in" function, remove "str" function and gofmt * Implement ternary, split, first, last functions * Remove JavaScript-specific template functions * Finalize template functions for webrpc schema types * Remove last generic or TS-specific template functions * Update template functions docs * Update README & examples with new webrpc-gen targets * Bring back goimport/gofmt for golang targets * PR feedback: Use Go 1.16+ * webrpc-gen CLI: Use v0.7.0 as an example target * Use os.WriteFile() instead of ioutil.WriteFile() * Improve isGolangTarget() so it works with local templates too * webrpc-gen -fmt=false: disable automatic code formatting * Lowercase all template option CLI flags, print target -help * Lowercase all generator options, update docs * Regenerate examples: Apply new DO NOT EDIT comment
This allows external tools like https://github.com/golang-cz/go2webrpc to build full webrpc schema.
* Upgrade golang-basics example to chi v4 * Create Go module for golang-basic example
This proves #74 is not caused by TypeScript generator
The latest github.com/webrpc/gen-golang@v0.7.4 now fixes #74, #104 and #105. See https://github.com/webrpc/gen-golang/releases/tag/v0.7.4 webrpc/gen-golang@7e1449e
Fixes false positive errors in Github Actions UI.
* Infer webrpc version if imported from another Go module Useful if you import webrpc into your Go project and invoke it via go run github.com/webrpc/webrpc/cmd/webrpc-gen. * Infer version from git as a fallback * make build: Inject version into the Go binary * Replace webrpc version in all generated files to avoid git conflicts * Update to actions/checkout@v4; Use 20 commit depth for git tags * Improve make generate diff
fatal: Cannot fetch both 8c823bf and refs/tags/v0.15.3 to refs/tags/v0.15.3 actions/checkout#1467
* Fix version: git describe --tags Without --tags option, git describe returns only annotated tags.. * Regenerate with latest golang template
* Embed golang template via Go module * Embed typescript, javascript, openapi and kotlin templates * Regenerate examples
Bumps [express](https://github.com/expressjs/express) from 4.17.3 to 4.19.2. - [Release notes](https://github.com/expressjs/express/releases) - [Changelog](https://github.com/expressjs/express/blob/master/History.md) - [Commits](expressjs/express@4.17.3...4.19.2) --- updated-dependencies: - dependency-name: express dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…269) * Use embedded templates for cached git URLs, improve webrpc-gen help * Support older versions of Go * Bump CI to Go 1.22 * Print full template git repo tag
* internal comments * ignore comments starting with bang --------- Co-authored-by: lukasjenicek <lukas.jenicek5@gmail.com>
* Improve error message & wrap underlying error * Remove obsolete example .gen.go file * Remove the use of obsolete io/ioutil pkg in RIDL tests * RIDL parser: Error out if stream is defined per argument type * WIP: Add Golang SSE streaming example * A working protype of Go<->Go SSE streaming in NDJSON * Improve/polish Go generated code * Fix make generate, add helper targets * wip: sse ts client * add onclose * add comments * add option types * add reusable sseResponse function * fix type for headers * Dont convert error to string * Add generic to WebRpcSSEOptions.onMessage * Add SubscribeMessagesReturn type * Ignore empty lines * trigger onError if sseResponse fails * send abort signal on clicking disconnect button * rename interface WebRpcSSEOptions to WebRpcStreamOptions * onClose handled in sseResponse() * return WebrpcRequestFailed for aborting * dont throw error from sseResponse, remove the catch statement * Implement Chat server example with msg broadcasting * rename interfaces for convention * tmp: abuse buildResponse to get error * add vitest * add missing return * basic unit test setup * Send ping() right away to unblock clients * Send newline after webrpcError to comply with NDJSON format * npm run test * Improve callback debugging messages * Re-introduce backend timeout * Support custom webrpc errors * Simulate network error / server shutting down Run server with: while true ; do go run ./; done * add timeout to stream resonse * fixe timeout value * Add CORS, expect username on both endpoints * Update TS contract * Send "SYSTEM" messages when someone joins/leaves * new design * Remove proxy * Fix typo in generated code * Fix timestamp * fix server port * fix scroll overflow * Use WebrpcError * improve log style * add custom message to abort error * Update RIDL * Fix typo * Move the generated method up, so it's easier to templatize * PR feedback * Remove doJSONRequest() in favor of doHTTPRequest() * Move streamWriter/streamReader definition to improve template readability * Close the response body of client request * Close request's response body properly & remove Read() for loop * Handle context timeouts in Go client after each ping message * Improve Go tests * Define new webrpc errors * Fix and improve generated code * Fix RIDL definition * generated with latest typescript templates * backward compatible * add logAppend helper * change name to toggle connect * limit height of log * add dynamic text to button * update connection status * prettier * add reconect * add exponential backoff * add less expensive way of checking for timout * allways clear interval * fix missing lastReadTime * improve onError * fix error handeling * error if abort signal is attemted to reconnect * remove error overload * regenerated contract * Dont swollow/recast onMessage errors * Regenerate examples --------- Co-authored-by: Alexander Kolberg <alexander.kolberg@alida.com> Co-authored-by: Jakub Alkhaled <jackkaled@gmail.com> Co-authored-by: Umitcan Bal <umitcanbal@gmail.com> Co-authored-by: Lukas Jenicek <lukas.jenicek5@gmail.com> Co-authored-by: Alexander Kolberg <alexander.kolberg@gmail.com>
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.0.2 to 5.0.13. - [Release notes](https://github.com/vitejs/vite/releases) - [Changelog](https://github.com/vitejs/vite/blob/v5.0.13/packages/vite/CHANGELOG.md) - [Commits](https://github.com/vitejs/vite/commits/v5.0.13/packages/vite) --- updated-dependencies: - dependency-name: vite dependency-type: direct:development ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Update go.mod deps, explicitly keep golang.org/x/sys at Go 1.16 * Let's drop support for Go 1.16, since golang.org/x/crypto fails to build too Error: ../../../go/pkg/mod/golang.org/x/crypto@v0.22.0/ssh/cipher.go:19:2: //go:build comment without // +build comment Error: ../../../go/pkg/mod/golang.org/x/crypto@v0.22.0/ssh/kex.go:19:2: //go:build comment without // +build comment * Bump to Go 1.18 as minimal supported version * Update examples to github.com/go-chi/chi@v5 * go mod tidy; update _example deps * Use git describe --tags * Bump to Go 1.19 to support golang.org/x/tools 2022+
* change reserved keyword enum to status in test schema * Fix tests --------- Co-authored-by: Austin Milt <austin.w.milt@gmail.com>
* add gen lastIndex func * add gen math funcs * add gen indent and strRepeat funcs * spelling * use sprig v3 gen funcmap
* Fix `make curl' in golang-sse example * Add handy go.mod replace directives * Improve streaming tests * Fix 10k test * Update the Go template * Update to golang@v0.14.4 * Update to golang@v0.14.5
…le) (#285) * Update to golang@v0.14.6 * Update dependencies (compatible with Go 1.19) go get -u go@1.19 ./... * Regenerate examples * make dep-upgrade-all: Require Go 1.19 for now * Update to golang@v0.14.7
* Update to golang@v0.14.8 * Regenerate tests/examples
update gitfs dependencies using fork
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.