pgloader icon indicating copy to clipboard operation
pgloader copied to clipboard

some files are too large

Open dataf3l opened this issue 2 years ago • 1 comments

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.

dataf3l avatar Jul 08 '23 11:07 dataf3l

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.

svantevonerichsen6906 avatar Jul 09 '23 10:07 svantevonerichsen6906