Comments (4)
hey I hope to make a relase of the phase 1 rewrite today to solve this problem! it will be a new major release
from graphiql.
@acao that's amazing!! could you clarify a bit more about how it will be solved? I noticed it's sort of possible on the pre-release branch, but it's pretty slow, and the click-through doesn't link to the correct line (it seems like it calculates the definition's line within the gql tag, then links to that line within the file, so it's off by the number of lines between the start of the file and the start of the gql tag).
from graphiql.
@addiebarron oh dear, well that is not good news haha! i mean, it's great news in that it's the first unexpected bug report for the pre-release, as I have a few new test cases for what should be this scenario, so this is very very good to know something is missing or else I would have made a broken release!
Though that pre-release I uploaded is a bit out of date, the issue is likely still present. Can you provide a few example file snippets of the mix of config/schema/code files etc to reproduce the jump to definition offset bug?
Also, I'm sad to know it's much slower for you, I've been testing with a small group of maybe 12 files, so I was hoping to open a work project today as well, as I feared this could also be the case. A likely explanation for this (i will need to profile) is that many of the bugs I fix in this first stage of the rewrite involve properly updating and even writing to the cache when we were not before, due to bugs that just weren't caught in the unit test because the MessageProcessor
instance lifecycle was too short (as unit tests should be!).
Thus why I added the new high-level integration suite at essentially the LSP protocol level, and thus revealed all these cache misses and issues that should not be happening (and tracking down the root and fixing, etc)! What's more, these caches and the parsing are in duplicate because of some flaws I inherited and haven't taken up to reconcile or worsened accidentally (until rewrite phase 2, where I consolidate the file and schema caches, and consolidate the parsing to )
As you may agree with your expertise, increased parsing and writes to and duplications of the various in memory caches means both way more in memory cacheing.
Also, a benchmark suite should be added to measure performance before this release. Some memory profiling with a larger project might help me track down some issues to target with the benchmarking. Initial project load (even with 12 files) and the definition lookups seemed slower to me, what else feels slower to you? Just everything? How many code files with/without graphql tags approximately? is there anything special about the schema, for example custom schema extensions?
(also btw this means i am not releasing! and it is soon monday here anyways π ) I need to take more time with this, and if the second stage of the rewrite proves to be more performant measurably than the 1st stage, then perhaps we will join them together, perhaps as separate PR merges but the same major release. if both prove to be significantly worse off than what's currently stable, then first I timebox targeting the perf issues, and if they persist without major changes then I go back to the drawing board, because performance is already an issue, I can't bring myself to make it worse!
If you wanted to try the 2nd stage rewrite out with vscode, and/or tinker with it (PRs against my PRs or main are welcome ofc!), you could take these steps:
- clone
- yarn, make some coffee π₯±
- run the
VSCode LSP Extension
under "Run and Debug" dropdown in vscode - select the project you want to test with in a new window
- when you want to test changes, just click the refresh button in the source editor
from graphiql.
Also thank you so much for taking the time to try out the pre-release, you saved us all so much pain haha
from graphiql.
Related Issues (20)
- [lsp-server] πVSCode Python autocomplete does not work HOT 2
- [graphiql] Plugin Examples / CDN integration broken HOT 4
- [lsp-server] π VSCode validation error Unknown fragment in v0.11.0 HOT 10
- [lsp-server] vscode-graphql triggers large amounts of requests to my graphql server for bulk file change events in 0.11.0 HOT 9
- [graphiql] npm build is debug for both js HOT 1
- [graphiql] Unknown operation named 'xyz' HOT 2
- [Monaco-graphql] Monaco-graphql fails to build with latest versions of Vite, monaco-editor and monaco-graphql. HOT 2
- [graphiql] Keep multiple responses from subscription HOT 5
- Long statment last 4 charaters hidden
- [lsp-server] π not working on neovim + coc HOT 2
- [cm6-graphql] peer dependencies are unnecessarily strict HOT 1
- [graphiql] CommonJS syntax in ESM build HOT 1
- [graphiql] Allow passing header options to legacy WS client HOT 1
- [lsp-server] π Go-to-definition not working within schema definition file (resurfacing bug?) HOT 3
- [graphiql] [security vulnerability] GraphiQL leaking query in the URL HOT 2
- [graphiql] [subscription] payload does not pass authorization token connection_init
- The normal and minified cdn files are the same size HOT 1
- [graphiql] monaco-graphql netlify example is down HOT 4
- move legacy files to prepublish
- [lsp-server] Feature Request: Support for offline schema transforms HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from graphiql.