Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure backend for module THEOS_PACKAGE_SCHEMEs and modularize rootless scheme #776

Merged
merged 16 commits into from
Feb 18, 2024

Conversation

L1ghtmann
Copy link
Member

@L1ghtmann L1ghtmann commented Oct 14, 2023

What does this implement/fix? Explain your changes.

Does this close any currently open issues?

No

Any relevant logs, error output, etc?

Any other comments?

Where has this been tested?

Operating System:

Linux (WSL)

Platform:

Target Platform:

Toolchain Version:

SDK Version:

Copy link
Member

@kabiroberai kabiroberai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love the idea of adding schemes via modules — hope to give this a more thorough review when I have the chance but no blockers atm

.gitignore Outdated Show resolved Hide resolved
Comment on lines 126 to 128
ifneq ($(THEOS_PACKAGE_SCHEME),)
_THEOS_LOAD_MODULES += schemes/$(THEOS_PACKAGE_SCHEME)
endif
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder whether we should deprecate explicitly setting THEOS_PACKAGE_SCHEME in favour of MODULES = <scheme>

Copy link
Member Author

@L1ghtmann L1ghtmann Oct 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I debated that as well. My current thought process is that schemes are modules, but modules aren't necessarily schemes, so keeping the associated variables separate continues that trend. Also helps make managing the necessary changes to internal Theos processes (e.g., stage) easier as we know the state of THEOS_PACKAGE_SCHEME is either a valid scheme or blank.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, now that I think about it, the stage changes I propose rely on THEOS_PACKAGE_INSTALL_PREFIX, not THEOS_PACKAGE_SCHEME. The only instance where we seem to rely on THEOS_PACKAGE_SCHEME internally is when we modify the linker's library search paths.

vendor/include Outdated Show resolved Hide resolved
Copy link
Member

@leptos-null leptos-null left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me.

Testing:

(for which I created a module called leptos_mod and placed in $THEOS/mod)

  • make package
  • make THEOS_PACKAGE_SCHEME=rootless package
  • make MODULES=leptos_mod package
  • make THEOS_PACKAGE_SCHEME=rootless MODULES=leptos_mod package
  • make "MODULES = leptos_mod rootless" package

Inspected tree of .theos/_ and used otool to verify build products.

@L1ghtmann L1ghtmann mentioned this pull request Feb 17, 2024
@uroboro uroboro merged commit 4bcc529 into theos:master Feb 18, 2024
@L1ghtmann L1ghtmann deleted the modularize branch February 18, 2024 20:59
L1ghtmann added a commit to L1ghtmann/theos that referenced this pull request Feb 18, 2024
…otless` scheme (theos#776)

* Modularize package schemes (rootless)

* Restructure mod dir for schemes + add install_name changes for rootless

* Should probably make this explicit

* Don't need this any more

* Can simplify this

* Don't run tmp stage steps if only DEBIAN exists in staging

* Rm extra spaces

* Force evaluation of stage variables at time of interal-package rule

* Only load scheme module passed

* Simplify

* Simplify (x2)

* Fix timing ... again

* These are handled by module now

* Fix vendor/include diff?

* Switch to vendor/mod/ and remove 'schemes/' prefix on rootless mod
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants