dimitri / pgloader

Migrate to PostgreSQL in a single command!
http://pgloader.io
Other
5.45k stars 548 forks source link

some files are too large #1508

Open dataf3l opened 1 year ago

dataf3l commented 1 year ago

As part of a research project, I am writing a code analysis tool, that counts the toke count for each file. unfortunately I cannot continue until these files are "split" into smaller files. Is it even possible to refactor these files into smaller files (about half the size?)

my tool seeks to generate recommendations on code, but I have a token limit.

can you guys assist by refactoring the code?

List of "too large" (files for analysis)

connection.lisp 6392
package.lisp 6331
transforms.lisp 5485
catalog.lisp 4613
migrate-database.lisp 4566
pgsql-schema.lisp 4355
pgsql-create-schema.lisp 4259
command-csv.lisp 4105
mysql-cast-rules.lisp 4023

I thank you in advance.

svantevonerichsen6906 commented 1 year ago

6000 tokens is not very much. It certainly doesn't make sense to change the code just to accomodate some external analysis.

If you want, fork the repo, then you can mostly split files where you want (toplevel forms). Make sure to start each file with a proper defpackage form, and adjust the :components with their dependencies in the asd file appropriately.