-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
remove potential leftover data #52
Conversation
🦋 Changeset detectedLatest commit: 88bcdca The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
22062bd
to
8cabe37
Compare
@@ -249,7 +249,7 @@ function createTemplate(config: TemplateConfig) { | |||
// Handle user preferences for Nix flakes | |||
if (!config.projectType.withNixFlake) { | |||
yield* Effect.forEach( | |||
[".envrc", "flake.lock", "flake.nix"], | |||
[".envrc", "flake.nix"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This effect was failing because flake.lock
doesn't exist, so we're not going past this code in this case. I feel like this is not the best fix; we should try to avoid this kind of situation in the future.
I guess we could pass { force: true }
to fs.remove
to ignore the exception if the path does not exist. Or handle it at the effect level and use something like Effect.ignore/ignoreLogged
. Not sure if ignoring the error is the best solution though, open to any better idea ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tatchi - thank you! I think either solution is fine, but I feel like I would probably use Effect.ignore
for this case.
Either way, this PR looks good for this particular issue. If you want to add Effect.ignore
s in the relevant places as part of this PR let me know. Otherwise also let me know if you're happy with this as is and I'll get this merged 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we basically add Effect.ignore
to every place where we use fs.ignore
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can start with just adding it to places where we attempt to remove files.
Thanks @tatchi ! |
Type
Description
Although I said no to the
changeset
andnix
, I still got some content related to them like theflake.nix
file or changesetpatchedDependencies
Related