peripheryapp / periphery

A tool to identify unused code in Swift projects.
MIT License
5.26k stars 193 forks source link

Move Configuration to separate module #798

Closed rofle100lvl closed 2 months ago

rofle100lvl commented 3 months ago

I decided to separate Configuration and here is why. First of all, it's a big piece of logic. And it should be well separated. Also I'm planning to make it start point in public API. So the scheme would be like that: User -> Setup Configuration -> Launch ProjectDriver to the project -> Got SourceGraph and can analyze anything he wants.

For that purpose Configuration should be separated in different module. Because of that, Its needed to make some moves around (because cycling dependencies) BaseLogger -> SeparatedModule Logger, Glob, Shell, SwiftVersion, SwiftParser -> Utils Configuration -> SeparatedModule

rofle100lvl commented 3 months ago

@ileitch What do you think about scheme for public API use?

rofle100lvl commented 2 months ago

@ileitch Can you check it? New and new conflicts will appear. And also I have a talk in october and by this time i really want to move my project from fork to spm dependency...

ileitch commented 2 months ago

I've implemented this in https://github.com/peripheryapp/periphery/pull/817 as I took a slightly different approach, but thanks for the contribution all the same!