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

Use the subrepo's FS for reading config and globbing #2960

Merged
merged 3 commits into from
Nov 15, 2023

Conversation

Tatskaari
Copy link
Member

No description provided.

@Tatskaari Tatskaari changed the title Use the subrepo's FS for reading config Use the subrepo's FS for reading config and globbing Nov 15, 2023
Copy link
Contributor

@samwestmoreland samwestmoreland left a comment

Choose a reason for hiding this comment

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

Nice!

@@ -255,7 +255,7 @@ func (state *BuildState) Initialise(subrepo *Subrepo) (err error) {
// handled for us already in plz.go
if state.CurrentSubrepo != "" {
state.RepoConfig = &Configuration{}
err = readConfigFilesInto(state.RepoConfig, append(subrepo.AdditionalConfigFiles, filepath.Join(subrepo.Root, ".plzconfig")))
err = readSubrepoConfig(state.RepoConfig, subrepo)
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Could we do an if err here?

@samwestmoreland
Copy link
Contributor

Oh looks like globbing might have broken? Getting a nil pointer dereference somwhere

@Tatskaari
Copy link
Member Author

Oh looks like globbing might have broken? Getting a nil pointer dereference somwhere

We were creating a dirfs from the string "" for architecture subrepos. This is explicitly not allowed by the documentation. I think we just need to handle this in the subrepo constructor.

@Tatskaari Tatskaari merged commit a652205 into thought-machine:master Nov 15, 2023
14 checks passed
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.

2 participants