Tech Debt: build logging is incorrect because the chdir behavior throws off src paths #22

Closed
opened 2025-03-18 21:15:40 -05:00 by bss · 0 comments
Owner

Take for instance

[2025-03-18 21:11:27,751 DEBUG   incorporealcms.ssg] starting to build against /home/bss/proj/incorporeal-cms/incorporeal-cms/incorporealcms/static/js || [] || ['style_switcher.js']
copying file 'js/style_switcher.js' -> '/var/www/localhost/incorporealcms-testing/tmp4fdxcvo9/static/js/style_switcher.js'
[2025-03-18 21:11:27,751 DEBUG   incorporealcms.ssg] starting to build against /home/bss/proj/incorporeal-cms/incorporeal-cms/incorporealcms/static/css || [] || ['base.css', 'plain.css', 'dark.css', 'light.css']
copying file 'css/base.css' -> '/var/www/localhost/incorporealcms-testing/tmp4fdxcvo9/static/css/base.css'
copying file 'css/plain.css' -> '/var/www/localhost/incorporealcms-testing/tmp4fdxcvo9/static/css/plain.css'
copying file 'css/dark.css' -> '/var/www/localhost/incorporealcms-testing/tmp4fdxcvo9/static/css/dark.css'
copying file 'css/light.css' -> '/var/www/localhost/incorporealcms-testing/tmp4fdxcvo9/static/css/light.css'
[2025-03-18 21:11:27,751 DEBUG   incorporealcms.ssg] starting to build against /home/bss/proj/incorporeal-cms/incorporeal-cms/incorporealcms/static/img || [] || ['favicon.png.license', 'favicon.png']
copying file 'img/favicon.png.license' -> '/var/www/localhost/incorporealcms-testing/tmp4fdxcvo9/static/img/favicon.png.license'
copying file 'img/favicon.png' -> '/var/www/localhost/incorporealcms-testing/tmp4fdxcvo9/static/img/favicon.png'

The "copying file" lines should all have a path prefixed with static/, like static/img/favicon.png, but I think the chdir into directories is confusing things. The chdir also makes some of the testing harder than it needs to be, so I should rethink this behavior.

Take for instance ``` [2025-03-18 21:11:27,751 DEBUG incorporealcms.ssg] starting to build against /home/bss/proj/incorporeal-cms/incorporeal-cms/incorporealcms/static/js || [] || ['style_switcher.js'] copying file 'js/style_switcher.js' -> '/var/www/localhost/incorporealcms-testing/tmp4fdxcvo9/static/js/style_switcher.js' [2025-03-18 21:11:27,751 DEBUG incorporealcms.ssg] starting to build against /home/bss/proj/incorporeal-cms/incorporeal-cms/incorporealcms/static/css || [] || ['base.css', 'plain.css', 'dark.css', 'light.css'] copying file 'css/base.css' -> '/var/www/localhost/incorporealcms-testing/tmp4fdxcvo9/static/css/base.css' copying file 'css/plain.css' -> '/var/www/localhost/incorporealcms-testing/tmp4fdxcvo9/static/css/plain.css' copying file 'css/dark.css' -> '/var/www/localhost/incorporealcms-testing/tmp4fdxcvo9/static/css/dark.css' copying file 'css/light.css' -> '/var/www/localhost/incorporealcms-testing/tmp4fdxcvo9/static/css/light.css' [2025-03-18 21:11:27,751 DEBUG incorporealcms.ssg] starting to build against /home/bss/proj/incorporeal-cms/incorporeal-cms/incorporealcms/static/img || [] || ['favicon.png.license', 'favicon.png'] copying file 'img/favicon.png.license' -> '/var/www/localhost/incorporealcms-testing/tmp4fdxcvo9/static/img/favicon.png.license' copying file 'img/favicon.png' -> '/var/www/localhost/incorporealcms-testing/tmp4fdxcvo9/static/img/favicon.png' ``` The "copying file" lines should all have a path prefixed with `static/`, like `static/img/favicon.png`, but I think the chdir into directories is confusing things. The chdir also makes some of the testing harder than it needs to be, so I should rethink this behavior.
bss added the
bug
label 2025-03-18 21:15:40 -05:00
bss closed this issue 2025-03-21 12:04:20 -05:00
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: bss/incorporeal-cms#22
No description provided.