phoe / asd-generator

Automatic generator for ASDF's .asd files
GNU General Public License v3.0
18 stars 3 forks source link

Does this project still makes sense if anyone can use package-inferred ASDF systems? #11

Closed svetlyak40wt closed 4 years ago

phoe commented 4 years ago

I guess so. Sometimes a module spans across several files; AFAIK package-inferred systems have no solution for that other than for enforcing a single package per file.

svetlyak40wt commented 4 years ago

How does asd-generator solve dependencies between different files?

phoe commented 4 years ago

AFAIK it doesn't; the dependencies are required to be manually specified in the generator data file.

svetlyak40wt commented 4 years ago

:(

Need to handle dependencies between files in the "asd" files is the reason why I switched to the package inferred systems.

Probably, automatic dependency handling could be a cool feature for this auto generator.

phoe commented 4 years ago

Please feel free to deliver such a feature as a PR or ask @guicho271828 for support with that; I do not think I will implement anything like that myself.

I have honestly completely forgotten about this project myself, and it is @guicho271828 who has evolved asd-generator into the (much more advanced!) state it is currently in. Kudos for him!

svetlyak40wt commented 4 years ago

Honestly, I just accidentally came across this library when preparing the next post for my Lisp Project of the Day blog.

Don't see the reason to implement automatic dependencies myself, because I completely switched to the package inferred systems and don't see reasons to switch back.

phoe commented 4 years ago

Okiedokie, understood. I am not particularly interested in this system anymore; I will likely merge PRs and perhaps fix some issues if a good bugticket hits it, but I am not aware of who uses this system and will likely not expand on it myself.

guicho271828 commented 4 years ago

hehe, automatic asd dependency!? Yeah, that has been in my long TODO list indeed.. It is much more difficult than in C/C++ though because we have additional complication stemming from macro expansion. http://make.mad-scientist.net/papers/advanced-auto-dependency-generation/#traditional

guicho271828 commented 4 years ago

It is a sad thing that the current CL ecosystem no longer recommend require as the standard dependency resolution mechanism.

svetlyak40wt commented 4 years ago

I meant automatic dependency between components. Maybe it will be possible to discover which symbols each lisp file defines?

Or just use some kind of genetic algorithm to discover suitable order of loading different system's component :)

phoe commented 4 years ago

Maybe it will be possible to discover which symbols each lisp file defines?

Very hard to perform unless you modify the Lisp system to store his information on a per-file basis, and that is doable only during compilation anyway. Code walking with macroexpansion will not be enough because defun is not the only way to define function; (setf fdefinition) and (setf symbol-function) also exist, and these are functions that may be called from anywhere in the code.