Comments (2)
Problem not being reported is a problem with VSCode. It is most likely happening after we returned newly created nodes from BaseTreeViewNodeProvider.getChildren
, and VSCode is unable to add them and the error is not thrown and just gobbled up. VSCode should log this properly or throw an error when calling _onDidChangeTreeData.fire()
which is the ultimate caller of a tree refresh (the latter probably cannot happen because it is probably an asynchronous action). Issue has been causing quite a lot of unhappiness and (probably incorrectly) marked as resolved in microsoft/vscode#71698.
While this is a general VSCode problem, it still hints at a bug in our code.
That bug is caused by our node id generation not generating unique node ids here:
makeNodeId(nodeClassName, parent, i) {
return [parent?.id || '', nodeClassName, i].join('..');
}
Specifically, in production, nodeClassName
is null
or undefined
or empty string, causing trouble.
from dbux.
Fixed by generating a unique id for each NodeClass
and use that instead of (in addition to) just the name
:
const nodeClasses = new Map();
function makeNodeClassId(NodeClass) {
// in production, names get mangled and/or removed entirely, so we need a different class identifier here
let id = nodeClasses.get(NodeClass);
if (!id) {
id = nodeClasses.size + 1;
nodeClasses.set(NodeClass, id);
}
return (NodeClass.name || '') + id;
}
from dbux.
Related Issues (20)
- Fix moduleFilters: files are logged multiple times
- fix and improve value rendering HOT 2
- feature: Dynamically enabling Dbux
- Better labels for DataFlow view HOT 1
- fix: more small call graph and call stack and more things
- [Bug] dbux is assuming `bash` in Windows resolves to MINGW/MSYS bash HOT 27
- feature: support correct call graphs for generator and async generator functions HOT 1
- ✅Checklist✅: Pathways + User Feedback Collection (2022/4)
- [Bug] Dbux does not deal well with erroneous getters
- Some more generator functions stuff, generator-try-catch etc.
- Check and fix Tutorial + Survey
- Add proper config file support
- Improve encoding/decoding performance
- Reduce post-deployment dependencies
- Feature: Data Dependency Graph (DDG) HOT 1
- feature: DDG control comprehension HOT 1
- fix: tests are sometimes not picked up correctly (`dpMaximumSubarray`) HOT 1
- Wrong version of node ?? HOT 1
- False Error node version should be ok; it is not OLD HOT 4
- [Bug] SyntaxError: Identifier '_class' has already been declared HOT 2
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 dbux.