Fix bspwm black screen: add provision() delegation and default configs - #4518
Conversation
|
|
||
| from archinstall.default_profiles.profile import DisplayServerType, GreeterType, Profile, ProfileType | ||
|
|
||
| if TYPE_CHECKING: |
There was a problem hiding this comment.
Why are they behind a type check?
There was a problem hiding this comment.
As far as I understand - python 3.14 evaluates annotations lazily (PEP 649), so Installer and User are never resolved at runtime - they're only used by type checkers. TYPE_CHECKING avoids importing heavy modules (Installer pulls in a lot) and sidesteps potential circular imports.
There was a problem hiding this comment.
Are there actual circular deps? If not we shouls define these as regular imports
There was a problem hiding this comment.
Yes, there are no cyclic dependencies right now. I didn't want to have them in the future. But you're right, it's probably overengineering.
There was a problem hiding this comment.
Sometimes it's good to encounter them as that means the code not well structured and probably needs refactoring
bspwm profile installs packages but does not provision configuration files. After login via lightdm the user sees a black screen with no keybindings because ~/.config/bspwm/bspwmrc and ~/.config/sxhkd/sxhkdrc do not exist.
Two fixes: