Giter Club home page Giter Club logo

Comments (2)

rlidwka avatar rlidwka commented on July 21, 2024

In case you don't have VSCode, this is what I have by default:

image

And this is what happens if I move /target/godot-gen anywhere inside of godot-core module:

image

from gdext.

Bromeon avatar Bromeon commented on July 21, 2024

This problem is also present on CLion, and I agree we should do something about it. Good that we have this issue now 🙂

The location where code is generated is indeed rather hacky at the moment. The problem is that not one, but two crates need code generation:

  • godot-ffi for low level "sys" symbols
  • godot-core for classes, utility functions, enums etc.

I could let both directly depend on godot-codegen, however that would mean that some effort is duplicated (notably parsing the JSON file and caching some symbols). This may not be such a big issue however.

An alternative would be to split generated classes into their own crate (like it's done with gdnative), which might also help compile times. godot-core could then depend on that crate. The problem here is that there are quite a few bidirectional dependencies (e.g. classes use Gd, but Gd also needs to know about Object and RefCounted classes). It's likely possible to detangle this through certain abstractions, but it might be a bit of effort. I'm also a bit scared of silly orphan-rule limitations if trait implementations need to be split across crates.

Maybe in the short term I could undo the change I made to generate everything inside the target folder -- the disadvantage would then again be that build artifacts are scattered in the file structure, and one cannot simply clean everything by e.g. deleting the target directory. Maybe godot-codegen should do that as a first step in its invocation, so that at least no old symbols remain.

from gdext.

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.