Comments (7)
i don't use dialyzer typically so i'm not sure i'm equipped to tackle this but i'll see what i can do
from jsx.
According to my little experiment, the fix is a simple inclusion of term [{}]
to the json_term()
type.
-type json_term() :: list({binary(), json_term()})
| [{}]
| list(json_term())
...
from jsx.
And it's also accurate to say that list({binary(), json_term()})
is actually list({binary() | atom(), json_term()})
from jsx.
i just ran dialyzer against the current development branch and i didn't get either of these errors. could you let me know what version you ran dialyzer against? also the output from dialyzer would be great too
from jsx.
Of course you will not see any warnings running dialyzer against just jsx (without the underspec warning turned on) because in this case dialyzer checks internal jsx consistency. Consider the following example: jsx's code handles A
, B
and C
cases, but its spec denotes it currently handles only A
and B
— it's perfectly ok for dialyzer; but when dialyzer checks caller's code it complains about using C
because jsx's spec discourage it.
Furthermore, projects with lots of deps in order to reduce memory footprint and runtime typically run dialyzer only against it's own codebase with PLTs generated from deps' typespecs, like this:
APP_PLT = ./.app_plt
$(APP_PLT):
dialyzer --plt ~/.dialyzer_plt --build_plt --output_plt $(APP_PLT) deps/*/ebin
dialyze: build $(APP_PLT)
dialyzer --plts ~/.dialyzer_plt $(APP_PLT) --fullpath ebin -Wunmatched_returns -Werror_handling -Wrace_conditions
Here ~/.dialyzer_plt
is a pregenerated PLT for the standard OTP distribution, and ./.app_plt
is the project local one, which contains typespecs extracted from deps.
And even if we put the dialyzer thing aside for a second inconsistency between the typespec and the README remains.
from jsx.
okay thanks for helping me understand this. i think i've fixed it. let me know if you find any other problems
from jsx.
You're welcome. 5868430 passes dialyzation, thank you.
from jsx.
Related Issues (20)
- jsx detect maps support may fail HOT 4
- Emoji Surrogate support HOT 4
- encode/decode datetime HOT 5
- How i can Insert RAW data? HOT 4
- Encode strings as strings HOT 1
- Parsing multiple json as stream HOT 3
- when can support json arrays
- Timestamp breaks encoding.
- Missing 2.10.0 tag HOT 1
- Configurable float formatting
- why?write HOT 1
- Dialyzer error for `with_tail`
- Release request HOT 8
- jsx_verify:config/0 type gone missing (dialyzer error) HOT 3
- Why return such a format? HOT 1
- Release request HOT 4
- Support the # as another way to comment strings
- Sensible default for tuple
- Documentation is broken on Hex for all releases
- B.C. dates convertes year to ****
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 jsx.