Append new/unknown packages from included files #165
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I have some configs for work, which I didn't want to add to my main repo, and I created a separate repo for it, which I then included in the
local.toml
only on my work PC. This works fine as long as I only want to add additional files to existing packages. But when I wanted to add a config for a package which isn't in my mainglobal.toml
, it failed. I needed to create an empty package in theglobal.toml
to which I then can add the files from my included repo.With this change, I can include packages from my
local.toml
where the mainglobal.toml
doesn't need to know anything about it.I don't know if I'm overlooking something here, and if there was a reason why unknown packages were rejected before (and even made it hard fail and not just print a warning). But in my local testing this small change works perfectly fine for my use-case. I'm just a bit confused as this case was already explicitly handled before (so it was known it can happen and wasn't just overlooked), so please tell me if I'm missing something.