Skip to content

newt: If no dependencies are present, still try to build #595

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vrahane
Copy link
Contributor

@vrahane vrahane commented Apr 11, 2025

  • If no dependencies are present, still try to build.
  • We saw that with no dependencies, just using newt for building without the OS was failing.

@vrahane vrahane requested a review from sjanc April 11, 2025 22:13
@vrahane vrahane marked this pull request as draft April 12, 2025 01:19
dependencies

- This only happens when `newt` is used to build a standalone project
  without any repos or dependencies listed, everything local
@vrahane vrahane force-pushed the vipul/debug_build branch from 54e26d8 to 38c0eb4 Compare April 12, 2025 02:07
@vrahane vrahane marked this pull request as ready for review April 12, 2025 02:13
if stages == nil {
util.FmtNewtError("Cannot resolve sysinit order: no stages defined.")
return []stage.StageFunc{}, nil
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this can only happen if sfs is empty so you can basically check that at the very beginning of the function. Also no need to emit warning.

return r.localPath
} else {
return ""
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This will "hide" all issues where Path() is called unintentionally on nil object, so better to actually explicitly handle this on caller side. Of course as long as there is some valid case in which we can actually have nil repo that we should handle properly, not sure when this could happen though tbh.

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

2 participants