Coder Social home page Coder Social logo

Comments (5)

Metalcape avatar Metalcape commented on August 30, 2024

I agree that the includes solution would be the best one, all things considered. The only slightly annoying thing would be exported CSV symbols getting scattered across multiple files in case you need to do some manual edits (like descriptions, because Ghidra doesn't support exporting comments as far as I know). We could work around this by allowing merge to output onto a new .yml file while also checking the address range from the main file, so that you can do a first merge, then do manual edits, and finally a second merge to place symbols in the appropriate subregions.

from pmdsky-debug.

theCapypara avatar theCapypara commented on August 30, 2024

It might be a bit overkill in this case but I wrote a library for merging nested YAML documents:

It's written in Rust and meant as a Python library. I could add a no-python build for resymgen:

https://github.com/theCapypara/configcrunch

from pmdsky-debug.

UsernameFodder avatar UsernameFodder commented on August 30, 2024

I agree that the includes solution would be the best one, all things considered. The only slightly annoying thing would be exported CSV symbols getting scattered across multiple files in case you need to do some manual edits (like descriptions, because Ghidra doesn't support exporting comments as far as I know). We could work around this by allowing merge to output onto a new .yml file while also checking the address range from the main file, so that you can do a first merge, then do manual edits, and finally a second merge to place symbols in the appropriate subregions.

This isn't really the point of the merge command IMO. I think it's unlikely merge will give you bad data, so you shouldn't really have to check anything, and even if you want to, git diff can be used. The main strength of merge is that it does deduplication/conflict resolution, so you can, e.g., copy a whole symbol table from a Ghidra project and easily merge it into an existing YAML file, ignoring things that don't fit or are already in the YAML file. I think it'd be easier to add descriptions in-situ rather than needing to transplant each entry into different YAML files manually. Having a two-stage merge seems complicated; how would resymgen decide which stage to run when invoked? You could still accomplish the "separate file" thing by just merging into a blank YAML file anyway.

from pmdsky-debug.

UsernameFodder avatar UsernameFodder commented on August 30, 2024

It might be a bit overkill in this case but I wrote a library for merging nested YAML documents:

It's written in Rust and meant as a Python library. I could add a no-python build for resymgen:

https://github.com/theCapypara/configcrunch

Hmm this does seem a bit much. And it seems like it might share some downsides with a !include approach, i.e. it would be hard to surface errors from the original file when running checks (which could only be done on the crunched file because the subfiles would no longer be standalone resymgen YAML). Though, I'm not familiar with what the API looks like, so maybe I'm misunderstanding the behavior.

from pmdsky-debug.

UsernameFodder avatar UsernameFodder commented on August 30, 2024

After more thought, I think a stricter, Rust-style module structure would make more sense here than C/C++-style file inclusion. Updated the issue description to reflect this.

from pmdsky-debug.

Related Issues (18)

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.