-
Notifications
You must be signed in to change notification settings - Fork 9
this was required for me to import properly #1
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
Closed
Conversation
This file contains hidden or 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
Merged
hugoduncan
added a commit
that referenced
this pull request
Mar 8, 2025
- Add a polylith style project for the mcp server - Update README to show usage depending on this project Closes #1
Owner
|
I've added a polylith style project that you can depend on. |
hugoduncan
added a commit
that referenced
this pull request
Oct 23, 2025
Replace org.clojure/data.json with cheshire/cheshire (v5.13.0) in: - components/json-rpc/deps.edn - components/http-client/deps.edn This change improves babashka compatibility (cheshire is built-in) and provides better performance (approximately 2x faster). Part of story #1: Switch from clojure.data.json to cheshire
hugoduncan
added a commit
that referenced
this pull request
Oct 23, 2025
Update stdio-related files to use cheshire instead of clojure.data.json: - stdio.clj: replace read-str/write-str with parse-string/generate-string - stdio_server.clj: update JSON generation calls - stdio_server_test.clj: update test assertions to use cheshire API All tests pass with no behavioral changes. Part of story #1: Switch from clojure.data.json to cheshire
hugoduncan
added a commit
that referenced
this pull request
Oct 23, 2025
Update http-client and http components to use cheshire for JSON: - Change namespace requires from clojure.data.json to cheshire.core - Replace json/read-str with json/parse-string - Replace json/write-str with json/generate-string Part of story #1: Switch from clojure.data.json to cheshire
hugoduncan
added a commit
that referenced
this pull request
Oct 23, 2025
Cheshire has two incompatibilities with clojure.data.json that caused test failures after the migration: 1. **Integer vs Long**: Cheshire parses JSON integers as java.lang.Integer when they fit in int range, while clojure.data.json uses Long. This caused ConcurrentHashMap lookup failures because Integer(1) and Long(1) are not equal as Java map keys. 2. **LazySeq vs Vector**: Cheshire parses JSON arrays as LazySeq, while clojure.data.json returns PersistentVector. This broke code using vector? checks and indexed access. Added `normalize-parsed-json` function that uses clojure.walk/postwalk to: - Convert all Integer values to Long - Convert all sequences to vectors (preserving maps) This ensures cheshire produces the same data structures as clojure.data.json, maintaining behavioral compatibility across the codebase. Relates to story #1 (Switch from clojure.data.json to cheshire)
hugoduncan
added a commit
that referenced
this pull request
Oct 23, 2025
Add error handling tests across JSON and transport layers to ensure consistent behavior when processing malformed JSON inputs. Changes: - json_test.clj: Add parse-error-test covering various malformed JSON edge cases (unclosed structures, invalid syntax, trailing commas, invalid escapes, numbers, and keywords) - http_server_test.clj: Add json-parse-error-handling-test verifying HTTP 400 responses for malformed JSON and recovery behavior - sse_server_test.clj: Add json-parse-error-handling-test verifying BadRequest responses for malformed JSON in SSE transport - stdio_server_test.clj: Enhance test-error-handling with comprehensive malformed JSON cases and document current error handling behavior All tests verify that transports handle parse errors gracefully and continue processing valid requests after encountering malformed input. Related to story #1 (cheshire migration)
hugoduncan
added a commit
that referenced
this pull request
Oct 23, 2025
Replaces clojure.data.json with cheshire throughout the codebase for improved performance and babashka compatibility. ## Key Changes - Updated dependencies in json-rpc and http-client components - Migrated all JSON parsing from `read-str` to `parse-string` - Migrated all JSON generation from `write-str` to `generate-string` - Created centralized json component for consistent JSON handling - Fixed HTTP/SSE server error handling to return 400 for parse errors - Fixed stdio server test cases to properly test empty line handling ## Benefits - 2x performance improvement (cheshire benchmarks) - Built into Babashka (removes dependency barrier) - Better error handling with specific exception types - Maintains full API compatibility and test coverage ## Testing - All 285 tests passing across unit and integration test suites - HTTP, SSE, and STDIO transports validated - JSON roundtrip conversion verified - Error handling maintains consistent behavior Closes story #1
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.
or am I missing something?