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

If a plan contains a change multiple times after the latest valid tag and you try adding a target, the operation completes and fails with a weird error #577

Closed
dlawrences opened this issue May 16, 2021 · 3 comments
Labels

Comments

@dlawrences
Copy link

dlawrences commented May 16, 2021

Say you have the following plan (that has been modified manually in an incorrect manner):

change1 2021-04-01T12:18:21Z UserName <user@domain.com> # added change1
change2 2021-04-01T12:18:21Z UserName <user@domain.com> # added change2
change3 2021-04-01T12:18:21Z UserName <user@domain.com> # added change3
@v1.0.0 2021-04-29T08:22:49Z UserName <user@domain.com> # Some tag
change1 [change1@v1.0.0] 2021-05-04T09:40:44Z UserName <user@domain.com> # reworked change1
change1 [change1@v1.0.0] 2021-05-04T10:40:44Z UserName <user@domain.com> # reworked change1 and slightly updated message

Then a command like:

sqitch target add someTargetName someTargetUri

will fail with the following error: Cannot write a plan file without a project name. Obviously, the plan above is not correct, but I believe the error handling here could be a little better. I guess we ended up here because the plan parsing has failed in some manner.

Thanks!

@theory theory added the bug label May 16, 2021
@theory
Copy link
Collaborator

theory commented Sep 5, 2021

That error described the issue exactly, but I imagine a bit of additional context would help. How about something like

Cannot write a plan file without a project name but none found in sqitch.plan.

@theory
Copy link
Collaborator

theory commented Sep 5, 2021

Or perhaps

Plan file corrupted: No project name found in sqitch.plan.

@theory
Copy link
Collaborator

theory commented Sep 5, 2021

Actually, I think I'll dupe the error from the plan file parser;

Missing %project pragma in sqitch.plan

@theory theory closed this as completed in 5511c76 Sep 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants