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

Test runtime log does not contain errors #1457

Merged
merged 4 commits into from
Aug 26, 2023
Merged

Test runtime log does not contain errors #1457

merged 4 commits into from
Aug 26, 2023

Conversation

xsebek
Copy link
Member

@xsebek xsebek commented Aug 23, 2023

@xsebek xsebek requested a review from byorgey August 23, 2023 14:03
@xsebek
Copy link
Member Author

xsebek commented Aug 23, 2023

The CI should now fail like this:

Screenshot 2023-08-23 at 16 02 05

Copy link
Member

@byorgey byorgey left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@xsebek xsebek added the merge me Trigger the merge process of the Pull request. label Aug 23, 2023
@xsebek
Copy link
Member Author

xsebek commented Aug 23, 2023

It seems there is an error about achievements in CI:

Tests
  Test runtime log does not contain errors:                                                                    FAIL
    test/integration/Main.hs:112:
    Error was produced during loading: Failed to acquire achievement from path '.':
      The 0 is missing!
    Use -p '/Test runtime log does not contain errors/' to rerun this test only.

@kostmo any ideas?

@byorgey
Copy link
Member

byorgey commented Aug 24, 2023

I don't understand how that message is even possible. It is coming from here:

DoesNotExist e -> "The" <+> ppr e <+> "is missing!"

The e on that line of code is an Entry:

data Entry = Directory | File
deriving (Eq, Show)
data LoadingFailure
= DoesNotExist Entry

I don't understand how calling ppr on an Entry could produce 0...

...oh, lol, the PrettyPrec Entry instance is wrong:

instance PrettyPrec Entry where
prettyPrec = const . prettyShowLow

It looks so plausible!

Fixing this will not fix the error but at least the error message will be more reasonable.

@xsebek xsebek removed the merge me Trigger the merge process of the Pull request. label Aug 24, 2023
@xsebek
Copy link
Member Author

xsebek commented Aug 24, 2023

I restarted ghc-9.6.2 job, it should at least show a better error message, but will still need more investigation.

@byorgey
Copy link
Member

byorgey commented Aug 24, 2023

I don't know if rerunning the test will pick up the bug fix unless we manually merge main into this branch (?).

@xsebek
Copy link
Member Author

xsebek commented Aug 24, 2023

@byorgey I thought it was running tests on merged state, but maybe I remembered that wrong. 😕

@byorgey
Copy link
Member

byorgey commented Aug 24, 2023

Ah, no, it looks like you're right. The failed test now has a correct error message.

@xsebek
Copy link
Member Author

xsebek commented Aug 24, 2023

(That's because I force-pushed the rebased branch 😉)

Seems like we are missing the achievements directory in CI. 🤔

else do
warn $ AssetNotLoaded Achievement "." $ DoesNotExist Directory
return []

If I understand it correctly, having no achievements before playing should not be an error. 🤔

@byorgey
Copy link
Member

byorgey commented Aug 24, 2023

Ah, yes, that makes sense. Not having the achievements directory exist is just the normal state of affairs when playing the game for the first time. It should not give a warning. I think we should just get rid of that else block.

@xsebek xsebek added the merge me Trigger the merge process of the Pull request. label Aug 26, 2023
@mergify mergify bot merged commit 61df42e into main Aug 26, 2023
9 checks passed
@mergify mergify bot deleted the test-runtime-log branch August 26, 2023 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge me Trigger the merge process of the Pull request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Check scenario ordering errors in CI
2 participants