GithubHelp home page GithubHelp logo

Comments (11)

magnus-madsen avatar magnus-madsen commented on June 13, 2024 1

@magnus-madsen should asts be printed "online" right as they're computed, or still after compilation like before?

I think now we can print them online. Then you can also free memory immediately (?)

from flix.

magnus-madsen avatar magnus-madsen commented on June 13, 2024

We could reintroduce a debug flag or require you to run some LSP command to enable debugging?

from flix.

magnus-madsen avatar magnus-madsen commented on June 13, 2024

Not sure how it works in command line mode today? Do you print the asts to disk as you go?

from flix.

magnus-madsen avatar magnus-madsen commented on June 13, 2024

What else can be done?

from flix.

JonathanStarup avatar JonathanStarup commented on June 13, 2024

you give asts with --Xprint-phase a, b, c (or something like that). in that case we can just print when we hit relevant asts

but if you have a runtime crash, its nice to print the asts because the runtime crash might not be easily reproduced and if you run the compiler again with debug flags the names of functions will be different from the runtime error

from flix.

magnus-madsen avatar magnus-madsen commented on June 13, 2024

I think we waste at least 30% of total memory keeping the later ASTs around.

It seems we have three use cases:

  • Printing some ASTs to disk by request.
  • Printing all ASTs to disk because of a crash.
  • Showing an AST via VSCode.

These are easily supported if we store everything. If we don't then I am not sure.

from flix.

JonathanStarup avatar JonathanStarup commented on June 13, 2024

Per our discussion, we will only support ast printing with up front demand during compilation.

from flix.

JonathanStarup avatar JonathanStarup commented on June 13, 2024

@magnus-madsen should asts be printed "online" right as they're computed, or still after compilation like before?

from flix.

JonathanStarup avatar JonathanStarup commented on June 13, 2024

@magnus-madsen should asts be printed "online" right as they're computed, or still after compilation like before?

I think now we can print them online. Then you can also free memory immediately (?)

only downside is that priting to file can fail - do we stop everything or let compilation continue?

from flix.

magnus-madsen avatar magnus-madsen commented on June 13, 2024

@magnus-madsen should asts be printed "online" right as they're computed, or still after compilation like before?

I think now we can print them online. Then you can also free memory immediately (?)

only downside is that priting to file can fail - do we stop everything or let compilation continue?

As in IO error? If you get that I think everything is broken anyway.

from flix.

magnus-madsen avatar magnus-madsen commented on June 13, 2024

E.g. if you have no more disk space probably you will not be able to write class files anyway.

from flix.

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.