Closed Super-JK closed 6 months ago
Salut. Ce serait bien de finir cette feature ainsi je peux finir le GUI et merge avec la branche principale. On aura bientôt la deadline donc ne traînons pas trop.
@Faltmatix La branche ui a été update avec la derniere PR #20, plus un petit example d'integration avec le parser (c90e52bd4318e29f0a1d6f98a2810183886993c7).
@Super-JK Top. Tu dirais que les changements sont stables ou tu anticipes encore des modifications? Si c'est stable, on peut fermer l'issue et je peux commencer à tout intégrer dès demain.
@Faltmatix l'interface va pas changer non
@Super-JK
@DanLoris et moi on arrive pas à run le projet. On a une erreur avec lombok où il ne trouve pas les symboles pour les variables et méthodes. Mes dépendences sont à jour et Intellij arrive bien à parse le code mais aucune exécution ne marche. Des idées?
@Faltmatix @DanLoris Il faut bien utiliser maven sinon ca marche pas.
mvn javafx:run
pour la gui
mvn exec:java
pour le main
mvn test
pour les tests
etc.
@Super-JK
Je confirme que mvn exec:java
et mvn test
fonctionnent. Mais mvn javafx:run
plante avec le message suivant:
java.lang.module.FindException: Error reading module: C:\Users\sacry_000\.m2\repository\org\openjfx\javafx-base\21\javafx-base-21-win.jar
Caused by: java.lang.module.InvalidModuleDescriptorException: Unsupported major.minor version 61.0
[ERROR] Command execution failed.
org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
J'ai investigué le problème. La "solution" stackoverflow parle d'un mismatch entre le jdk qui compile et le jre qui run le code. Mais j'ai vérifié et notre pom.xml est bien à java 21 pour les deux et javafx. Et j'ai recompilé avec le jdk 17 pour voir et cela n'a rien changé.
Je me demande si c'est un problème sur Windows ou pas parce que Loris a le même que moi. Faudrait voir si @LemaireEmilien aussi a ce problème pour run javafx.
Met bien tout a jour fait un mvn clean Essaie le jar qu'il y a dans les actions et essaie de pas faire ca depuis intelij
Oui. J'ai fais plusieurs fois un mvn clean avant de compiler et run, cela n'a pas changé le résultat.
Je viens d'essayer de produire le jar comme on le fait avec CI/CD mais j'ai no main manifest attribute, in .\calculator-cucumber-0.5.0.jar
quand je l'exécute. Je regarderai une nouvelle fois à cela plus tard si personne ne trouve de solution.
Describe the new functionality you would like to see In order to make the Calculator usable in practice, it needs to accept an input parameter of type string. This string will be read, parsed and converted into a syntactically valid expression, or a syntax error will be returned if the string does not respect the correct syntax. Valid expressions will be evaluated, and the result of the evaluation will be printed on the console.
In order to achieve this functionality we need an expression parser:
[ ] In its most basic functionality, the expression parser will only accept as input properly balanced expressions with parentheses in the right places. E.g. "((4 + 5 + 6) (7 + (5 / 2 / 7)) 9)". The parser should be able to read expressions in either prefix, infix or postfix notation. E.g. "(+(4,5,6),+(7,/(5,2,7)),9)" for prefix; "((4,5,6)+,(7,(5,2,7)/)+,9)" for postfix. The parser should not be space-sensitive, the presence or absence of spaces, tabs and so on should not make a difference when parsing. Slight variations of the allowed notation could be considered, for example a pre- or postfix notation with spaces instead of commas as separator between arguments. E.g. "(+(4 5 6) +(7 /(5 2 7)) 9)", which incidentally also corresponds to the way of writing expressions in the Schema functional programming language. When implementing this functionality, the "output" of an expression should be consistent with the accepted input. (In other words, any valid string given as input should return an equivalent string after converting it to an Expression and back to a string. Conversely, any string generated as output from an expression should be acceptable as input to the parser without any errors...
[ ] A more sophisticated functionality should take into account operator precedence to avoid superfluous parentheses. For example, if we know what and / have precedence over + and -, then we can simplify the expression "((4 + 5 + 6) (7 + (5 / 2 / 7)) 9)" to something like "(4+5+ 6)(7 + 5/2/7)9".
[ ] This feature needs to be accompanied by the necessary unit tests and cucumber BDD tests.
Is your feature request related to a specific need or problem? Without a proper expression parser, the caclulator is not really practically useful, since creating expressions manually in terms of object trees is very cumbersome, error-prone and time-consuming.
Additional context Several Java libraries exist for creating parsers, it is recommended to choice the most appropriate one of them rather than to reinvent the wheel from scratch.