Giter VIP home page Giter VIP logo

Comments (3)

nathany-copia avatar nathany-copia commented on July 29, 2024 1

Elixir 1.16.0 deprecated File.stream!(file, options, line_or_bytes)

So this line File.stream!(path, [], 2048) should just be File.stream!(path, 2048). I've had to make the same change in my own code to resolve a similar Dialyzer error.

I'm not sure exactly how to do that while still supporting Elixir < 1.16.0 though. 🤔

FYI, the reason why I'm here trying this is because code that uses Tesla is seeing similar Dialyzer errors bubble up through the call stack in Elixir 1.16.

from tesla.

yordis avatar yordis commented on July 29, 2024

@nathany-copia are you able to fix the situation yourself?

from tesla.

nathany-copia avatar nathany-copia commented on July 29, 2024

I can try.

Is apps_direct the right option? Default is app_tree.

https://github.com/jeremyjh/dialyxir?tab=readme-ov-file#dependencies

Then it gets interesting -- I'll see if I can figure these out, but I do find dialyzer errors rather difficult to read.

lib/tesla/multipart.ex:94: Function add_file/2 has no local return
lib/tesla/multipart.ex:94: Function add_file/3 has no local return
lib/tesla/multipart.ex:106: The call 'Elixir.File':'stream!'(_path@1::binary() | maybe_improper_list(binary() | maybe_improper_list(any(),binary() | []) | char(),binary() | []),[],2048) breaks the contract ('Elixir.Path':t(),'line' | pos_integer(),[stream_mode()]) -> 'Elixir.File.Stream':t()

from tesla.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.