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

Unsuitable types for + operation (xs:string, xs:integer). #3188

Closed
volodya-lombrozo opened this issue May 16, 2024 · 8 comments
Closed

Unsuitable types for + operation (xs:string, xs:integer). #3188

volodya-lombrozo opened this issue May 16, 2024 · 8 comments
Assignees
Labels

Comments

@volodya-lombrozo
Copy link
Member

volodya-lombrozo commented May 16, 2024

I have tried to convert xmir to phi using the following plugin configuration:

<plugin>
  <groupId>org.eolang</groupId>
  <artifactId>eo-maven-plugin</artifactId>
  <version>0.38.0</version>
  <executions>
    <execution>
      <id>convert-xmir-to-phi</id>
      <phase>generate-test-sources</phase>
      <goals>
        <goal>xmir-to-phi</goal>
      </goals>
      <configuration>
        <phiInputDir>${project.build.directory}/generated-sources/opep-decompile-xmir-modified</phiInputDir>
        <phiOutputDir>${project.build.directory}/generated-sources/opep-decompile-phi-modified</phiOutputDir>
      </configuration>
    </execution>
  </executions>
</plugin>

The file that I tried to convert:
B.xmir.txt

The exception I get:

Caused by: net.sf.saxon.trans.XPathException: Unsuitable types for + operation (xs:string, xs:integer). Found while atomizing the second operand of 'to' in {$tabs} on line 172
    at net.sf.saxon.expr.Atomizer$AtomizerElaborator.lambda$elaborateForPull$0 (Atomizer.java:687)
    at net.sf.saxon.expr.UntypedSequenceConverter$UntypedSequenceConverterElaborator.lambda$elaborateForPull$0 (UntypedSequenceConverter.java:304)
    at net.sf.saxon.expr.CardinalityChecker$CardinalityCheckerElaborator.lambda$elaborateForPull$0 (CardinalityChecker.java:506)
    at net.sf.saxon.expr.elab.PullElaborator.lambda$elaborateForItem$1 (PullElaborator.java:54)
    at net.sf.saxon.expr.ItemChecker$ItemCheckerElaborator.lambda$elaborateForItem$1 (ItemChecker.java:454)
    at net.sf.saxon.expr.RangeExpression$RangeElaborator.lambda$elaborateForPull$0 (RangeExpression.java:366)
    at net.sf.saxon.expr.instruct.ForEach$ForEachElaborator.lambda$elaborateForPull$1 (ForEach.java:765)
    at net.sf.saxon.expr.instruct.Block$BlockElaborator$BlockIterator.getNthChildIterator (Block.java:832)
    at net.sf.saxon.expr.instruct.AbstractBlockIterator.next (AbstractBlockIterator.java:66)
    at net.sf.saxon.value.SequenceExtent.from (SequenceExtent.java:48)
    at net.sf.saxon.om.SequenceTool.toGroundedValue (SequenceTool.java:55)
    at net.sf.saxon.expr.elab.EagerPullEvaluator.evaluate (EagerPullEvaluator.java:37)
    at net.sf.saxon.expr.elab.LearningEvaluator.evaluate (LearningEvaluator.java:59)
    at net.sf.saxon.expr.instruct.UserFunction.call (UserFunction.java:704)
    at net.sf.saxon.expr.UserFunctionCall$UserFunctionCallElaborator.lambda$elaborateForPull$0 (UserFunctionCall.java:746)
    at net.sf.saxon.expr.AdjacentTextNodeMerger$AdjacentTextNodeMergerElaborator.lambda$elaborateForPull$0 (AdjacentTextNodeMerger.java:273)
    at net.sf.saxon.expr.Atomizer$AtomizerElaborator.lambda$elaborateForPull$0 (Atomizer.java:678)
    at net.sf.saxon.expr.AtomicSequenceConverter$AtomicSequenceConverterElaborator.lambda$elaborateForPull$0 (AtomicSequenceConverter.java:536)
    at net.sf.saxon.expr.elab.LazyPullEvaluator.evaluate (LazyPullEvaluator.java:39)
    at net.sf.saxon.expr.FunctionCall$FunctionCallElaborator.evaluateArguments (FunctionCall.java:671)
    at net.sf.saxon.expr.SystemFunctionCall$SystemFunctionCallElaborator.lambda$elaborateForPush$8 (SystemFunctionCall.java:687)
    at net.sf.saxon.expr.instruct.ValueOf$ValueOfElaborator.lambda$elaborateForPush$1 (ValueOf.java:420)
    at net.sf.saxon.expr.instruct.Block$BlockElaborator.lambda$elaborateForPush$4 (Block.java:895)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPush$6 (LetExpression.java:942)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPush$10 (Choose.java:1168)
    at net.sf.saxon.expr.instruct.Block$BlockElaborator.lambda$elaborateForPush$1 (Block.java:853)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPush$11 (Choose.java:1173)
    at net.sf.saxon.expr.instruct.Block$BlockElaborator.lambda$elaborateForPush$4 (Block.java:895)
    at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail (TemplateRule.java:376)
    at net.sf.saxon.trans.Mode.handleRuleNotNull (Mode.java:587)
    at net.sf.saxon.trans.Mode.applyTemplates (Mode.java:521)
    at net.sf.saxon.expr.instruct.ApplyTemplates$ApplyTemplatesPackage.processLeavingTail (ApplyTemplates.java:548)
    at net.sf.saxon.expr.Expression.dispatchTailCall (Expression.java:976)
    at net.sf.saxon.expr.instruct.ApplyTemplates$ApplyTemplatesElaborator.lambda$elaborateForPush$1 (ApplyTemplates.java:651)
    at net.sf.saxon.expr.instruct.Block$BlockElaborator.lambda$elaborateForPush$1 (Block.java:853)
    at net.sf.saxon.expr.instruct.ForEach$ForEachElaborator.lambda$elaborateForPush$5 (ForEach.java:813)
    at net.sf.saxon.expr.instruct.Block$BlockElaborator.lambda$elaborateForPush$4 (Block.java:895)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPush$6 (LetExpression.java:942)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPush$10 (Choose.java:1168)
    at net.sf.saxon.expr.instruct.Block$BlockElaborator.lambda$elaborateForPush$3 (Block.java:882)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPush$6 (LetExpression.java:942)
    at net.sf.saxon.expr.instruct.Block$BlockElaborator.lambda$elaborateForPush$2 (Block.java:867)
    at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail (TemplateRule.java:376)
    at net.sf.saxon.trans.Mode.handleRuleNotNull (Mode.java:587)
    at net.sf.saxon.trans.Mode.applyTemplates (Mode.java:521)
    at net.sf.saxon.expr.instruct.ApplyTemplates$ApplyTemplatesElaborator.lambda$elaborateForPush$1 (ApplyTemplates.java:650)
    at net.sf.saxon.expr.instruct.Block$BlockElaborator.lambda$elaborateForPush$1 (Block.java:853)
    at net.sf.saxon.expr.instruct.ForEach$ForEachElaborator.lambda$elaborateForPush$5 (ForEach.java:813)
    at net.sf.saxon.expr.instruct.Block$BlockElaborator.lambda$elaborateForPush$4 (Block.java:895)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPush$6 (LetExpression.java:942)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPush$10 (Choose.java:1168)
    at net.sf.saxon.expr.instruct.Block$BlockElaborator.lambda$elaborateForPush$3 (Block.java:882)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPush$6 (LetExpression.java:942)
    at net.sf.saxon.expr.instruct.Block$BlockElaborator.lambda$elaborateForPush$2 (Block.java:867)
    at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail (TemplateRule.java:376)
    at net.sf.saxon.trans.Mode.handleRuleNotNull (Mode.java:587)
    at net.sf.saxon.trans.Mode.applyTemplates (Mode.java:521)
    at net.sf.saxon.expr.instruct.ApplyTemplates$ApplyTemplatesElaborator.lambda$elaborateForPush$1 (ApplyTemplates.java:650)
    at net.sf.saxon.expr.instruct.Block$BlockElaborator.lambda$elaborateForPush$1 (Block.java:853)
    at net.sf.saxon.expr.instruct.ForEach$ForEachElaborator.lambda$elaborateForPush$5 (ForEach.java:813)
    at net.sf.saxon.expr.instruct.Block$BlockElaborator.lambda$elaborateForPush$2 (Block.java:867)
    at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail (TemplateRule.java:376)
    at net.sf.saxon.trans.Mode.handleRuleNotNull (Mode.java:587)
    at net.sf.saxon.trans.Mode.applyTemplates (Mode.java:521)
    at net.sf.saxon.expr.instruct.ApplyTemplates$ApplyTemplatesElaborator.lambda$elaborateForPush$1 (ApplyTemplates.java:650)
    at net.sf.saxon.expr.instruct.Block$BlockElaborator.lambda$elaborateForPush$2 (Block.java:864)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPush$6 (LetExpression.java:942)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPush$11 (Choose.java:1173)
    at net.sf.saxon.expr.instruct.Block$BlockElaborator.lambda$elaborateForPush$4 (Block.java:895)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPush$6 (LetExpression.java:942)
    at net.sf.saxon.expr.instruct.Block$BlockElaborator.lambda$elaborateForPush$4 (Block.java:895)
    at net.sf.saxon.expr.instruct.FixedElement$FixedElementElaborator.lambda$elaborateForPush$0 (FixedElement.java:640)
    at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail (TemplateRule.java:376)
    at net.sf.saxon.trans.Mode.handleRuleNotNull (Mode.java:587)
    at net.sf.saxon.trans.Mode.applyTemplates (Mode.java:521)
    at net.sf.saxon.trans.rules.TextOnlyCopyRuleSet.process (TextOnlyCopyRuleSet.java:72)
    at net.sf.saxon.trans.Mode.applyTemplates (Mode.java:518)
    at net.sf.saxon.trans.XsltController.applyTemplates (XsltController.java:684)
    at net.sf.saxon.s9api.AbstractXsltTransformer.applyTemplatesToSource (AbstractXsltTransformer.java:430)
    at net.sf.saxon.s9api.XsltTransformer.transform (XsltTransformer.java:358)
    at net.sf.saxon.jaxp.TransformerImpl.transform (TransformerImpl.java:75)
    at com.jcabi.xml.XSLDocument.transformInto (XSLDocument.java:458)
    at com.jcabi.xml.XSLDocument.transform (XSLDocument.java:420)
    at com.yegor256.xsline.StXSL.lambda$new$1 (StXSL.java:45)
    at com.yegor256.xsline.StLambda.apply (StLambda.java:115)
    at com.yegor256.xsline.StEnvelope.apply (StEnvelope.java:61)
    at com.yegor256.xsline.StEnvelope.apply (StEnvelope.java:61)
    at com.yegor256.xsline.StLogged.apply (StLogged.java:110)
    at com.yegor256.xsline.StLogged.apply (StLogged.java:110)
    at com.yegor256.xsline.StLogged.apply (StLogged.java:110)
    at com.yegor256.xsline.StLogged.apply (StLogged.java:135)
    at org.eolang.parser.StEoLogged.apply (StEoLogged.java:76)
    at com.yegor256.xsline.StFast.apply (StFast.java:94)
    at com.yegor256.xsline.StAfter.lambda$new$0 (StAfter.java:48)
    at com.yegor256.xsline.StLambda.apply (StLambda.java:115)
    at com.yegor256.xsline.StEnvelope.apply (StEnvelope.java:61)
    at com.yegor256.xsline.StSequence.lambda$apply$4 (StSequence.java:169)
    at com.yegor256.xsline.StLambda.apply (StLambda.java:115)
    at com.yegor256.xsline.StEnvelope.apply (StEnvelope.java:61)
    at com.yegor256.xsline.Xsline.pass (Xsline.java:85)
    at org.eolang.maven.PhiMojo.translated (PhiMojo.java:179)
    at org.eolang.maven.PhiMojo.lambda$exec$0 (PhiMojo.java:129)
    at org.cactoos.scalar.CallableEnvelope.call (CallableEnvelope.java:53)
    at java.util.concurrent.FutureTask.run (FutureTask.java:264)
    at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1136)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:635)
    at java.lang.Thread.run (Thread.java:833)

Full log:
build.log

As I understand from the log, I have some problems with the .plus object. So, I have a few questions related to it:

  • Why does this check even happen? I want to convert from xmir to phi, that's all. I don't need to check this xmir. Moreover, this check isn't related to the xmir format, as I understand.
  • How can I fix it or ignore it?

It's quite urgent. Thank you

@volodya-lombrozo volodya-lombrozo changed the title Caused by: net.sf.saxon.trans.XPathException: Unsuitable types for + operation (xs:string, xs:integer). Found while atomizing the second operand of 'to' in {$tabs} on line 172 Unsuitable types for + operation (xs:string, xs:integer). May 16, 2024
Copy link

@volodya-lombrozo the issue body is empty, please provide more details for this problem.

@volodya-lombrozo
Copy link
Member Author

@maxonfjvipon Could you help here, please? I can't finish an issue without this part.

@maxonfjvipon
Copy link
Member

@yegor256 let's make a new release with tag 0.38.1

@yegor256
Copy link
Member

@rultor release, tag is 0.38.1

@rultor
Copy link
Contributor

rultor commented May 17, 2024

@rultor release, tag is 0.38.1

@yegor256 OK, I will release it now. Please check the progress here

@rultor
Copy link
Contributor

rultor commented May 17, 2024

@rultor release, tag is 0.38.1

@yegor256 Done! FYI, the full log is here (took me 14min)

@maxonfjvipon
Copy link
Member

@volodya-lombrozo please use version 0.38.1, optimizations before actual converting to phi are enabled by default. To disable them use phiOptimize = false.

@volodya-lombrozo
Copy link
Member Author

@maxonfjvipon It solved the original problem. Thank you!

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

4 participants