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

ShakeMojoTest.getsAlreadyShakenResultsFromCache is not stable #2727

Closed
yegor256 opened this issue Dec 23, 2023 · 6 comments · Fixed by #2823
Closed

ShakeMojoTest.getsAlreadyShakenResultsFromCache is not stable #2727

yegor256 opened this issue Dec 23, 2023 · 6 comments · Fixed by #2823
Assignees
Labels

Comments

@yegor256
Copy link
Member

Check this one: https://github.com/objectionary/eo/actions/runs/7306204181/job/19910671618

The test fails:

ShakeMojoTest.getsAlreadyShakenResultsFromCache:102 Ready shaken results should be loaded from cache.
Expected: is <<?xml version="1.0" encoding="UTF-8"?>
<!--
The MIT License (MIT)

Copyright (c) 2016-2023 Objectionary.com

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-->
<program name="main">
   <errors/>
   <objects>
      <o abstract=""
         line="3"
         name="main"
         original-name="main"
         pos="0">
         <o line="3" name="args" pos="1"/>
         <o base=".print" line="4" name="@" pos="19">
            <o base="org.eolang.stdout" line="4" pos="3">
               <o base="org.eolang.string" data="string" line="4" pos="10">
            Dummy
          </o>
            </o>
         </o>
      </o>
   </objects>
</program>
>
     but: was <<?xml version="1.0" encoding="UTF-8"?>
<program dob="2023-03-19T00:00:00"
         ms="2"
         name="foo.x.main"
         revision="1234567"
         source="/tmp/junit12684378047439098522/foo/x/main.eo"
         time="2023-12-23T04:36:04.023012357Z"
         version="0.0-SNAPSHOT"><!--This is XMIR - a dialect of XML, which is used to present a parsed EO program. For more information please visit https://news.eolang.org/2022-11-25-xmir-guide.html-->
   <listing>+alias stdout org.eolang.io.stdout
+package f

[x] &gt; main
  (stdout "Hello!" x).print &gt; @
</listing>
   <errors>
      <error check="missing-home"
             line=""
             severity="warning"
             sheet="mandatory-home-meta"
             step="0">Missing home</error>
      <error check="missing-version-meta"
             line=""
             severity="warning"
             sheet="mandatory-version-meta"
             step="0">Missing version meta</error>
   </errors>
   <sheets>
      <sheet>not-empty-atoms</sheet>
      <sheet>duplicate-names</sheet>
      <sheet>many-free-attributes</sheet>
      <sheet>broken-aliases</sheet>
      <sheet>duplicate-aliases</sheet>
      <sheet>global-nonames</sheet>
      <sheet>same-line-names</sheet>
      <sheet>self-naming</sheet>
      <sheet>cti-adds-errors</sheet>
      <sheet>add-refs</sheet>
      <sheet>wrap-method-calls</sheet>
      <sheet>expand-qqs</sheet>
      <sheet>add-probes</sheet>
      <sheet>vars-float-up</sheet>
      <sheet>add-refs</sheet>
      <sheet>sparse-decoration</sheet>
      <sheet>unsorted-metas</sheet>
      <sheet>incorrect-architect</sheet>
      <sheet>incorrect-home</sheet>
      <sheet>incorrect-version</sheet>
      <sheet>expand-aliases</sheet>
      <sheet>resolve-aliases</sheet>
      <sheet>add-refs</sheet>
      <sheet>add-default-package</sheet>
      <sheet>broken-refs</sheet>
      <sheet>unknown-names</sheet>
      <sheet>noname-attributes</sheet>
      <sheet>duplicate-names</sheet>
      <sheet>duplicate-metas</sheet>
      <sheet>mandatory-package-meta</sheet>
      <sheet>mandatory-home-meta</sheet>
      <sheet>mandatory-version-meta</sheet>
      <sheet>correct-package-meta</sheet>
      <sheet>prohibited-package</sheet>
      <sheet>external-weak-typed-atoms</sheet>
      <sheet>unused-aliases</sheet>
      <sheet>unit-test-without-phi</sheet>
      <sheet>explicit-data</sheet>
      <sheet>set-locators</sheet>
   </sheets>
   <license/>
   <metas>
      <meta line="1">
         <head>alias</head>
         <tail>stdout org.eolang.io.stdout</tail>
         <part>stdout</part>
         <part>org.eolang.io.stdout</part>
      </meta>
      <meta line="2">
         <head>package</head>
         <tail>f</tail>
         <part>f</part>
      </meta>
   </metas>
   <objects>
      <o abstract=""
         line="4"
         loc="Φ.f.main"
         name="main"
         original-name="main"
         pos="0">
         <o line="4" loc="Φ.f.main.x" name="x" pos="1"/>
         <o base=".print" line="5" loc="Φ.f.main.φ" name="@" pos="21">
            <o base="org.eolang.io.stdout" line="5" loc="Φ.f.main.φ.ρ" pos="3">
               <o base="org.eolang.string"
                  line="5"
                  loc="Φ.f.main.φ.ρ.α0"
                  pos="10">
                  <o base="org.eolang.bytes" data="bytes" loc="Φ.f.main.φ.ρ.α0.α0">48 65 6C 6C 6F 21</o>
               </o>
               <o base="x" line="5" loc="Φ.f.main.φ.ρ.α1" pos="19" ref="4"/>
            </o>
         </o>
      </o>
   </objects>
</program>
>
@yegor256
Copy link
Member Author

@maxonfjvipon please, help

@yegor256
Copy link
Member Author

@maxonfjvipon the same happens with OptimizeMojoTest.getsAlreadyOptimizedResultsFromCache: https://github.com/objectionary/eo/actions/runs/7319791138/job/19938057855 I suspect that this is somehow related to this change we made recently: #2720

@maxonfjvipon
Copy link
Member

@Yanich96 could you please take it?

@Yanich96
Copy link
Contributor

@maxonfjvipon I can take it

@Yanich96
Copy link
Contributor

@yegor256 @maxonfjvipon I made a temporary fix (but not a reliable one) in my last one pull request #2724 and todo that I can fix it correctly.

@maxonfjvipon
Copy link
Member

@Yanich96 go ahead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants