-
Notifications
You must be signed in to change notification settings - Fork 48
ogma-core: FPrime backend now requires JAVA #206
Copy link
Copy link
Closed
Labels
CR:Status:ClosedAdmin only: Change request that has been completedAdmin only: Change request that has been completedCR:Type:BugAdmin only: Change request pertaining to error detectedAdmin only: Change request pertaining to error detected
Milestone
Description
Description
The FPrime backend now requires java, which makes the generated Dockerfile no longer compile.
Type
- Bug: Generated docker image does not build.
Additional context
None.
Requester
- Ivan Perez.
Method to check presence of bug
Running the FPrime backend and compiling the generated code with the following files breaks when trying to build the docker image generated by Ogma:
$ ogma standalone --file-name /tmp/document.json -f /tmp/json-format.cfg -p literal --target-file-name copilot --target-dir fprime_demo
$ ogma fprime --app-target-dir fprime_demo --handlers-file /tmp/fprime-handlers --input-file /tmp/document.json -f /tmp/json-format.cfg -p literal --variable-db /tmp/fprime-variable-db
$ cabal v1-exec -- runhaskell fprime_demo/Copilot.hs
$ mv copilot* fprime_demo/
$ cd fprime_demo/
$ docker build -t ogma fprime-demo .
Auxiliary files:
--- document.json
{
"Example": {
"internal_variables": [],
"external_variables": [
{"name":"input", "type":"Float", "meaning": "Input from the system"}
],
"properties": [
{
"id": "MyProperty",
"formula": "PTLTL.alwaysBeen (input /= 30.0)",
"text": "Input is never 30"
}
]
}
}
--- fprime-handlers
handlerMyProperty
--- fprime-variable-db
("pullup", "bool")
("input", "float")
--- json-format.cfg
JSONFormat
{ specInternalVars = Just "..internal_variables[*]"
, specInternalVarId = ".name"
, specInternalVarExpr = ".meaning"
, specInternalVarType = Just ".type"
, specExternalVars = Just "..external_variables[*]"
, specExternalVarId = ".name"
, specExternalVarType = Just ".type"
, specRequirements = "..properties[*]"
, specRequirementId = ".id"
, specRequirementDesc = Just ".text"
, specRequirementExpr = ".formula"
}
These build steps break with the message:
fpp tools require 'java'. Please install 'java' and ensure it is in your PATH.
Expected result
The build steps above should complete successfully.
Desired result
The build steps above should complete successfully.
Proposed solution
Modify Dockerfile in the default FPrime template to install default-jre.
Further notes
None.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
CR:Status:ClosedAdmin only: Change request that has been completedAdmin only: Change request that has been completedCR:Type:BugAdmin only: Change request pertaining to error detectedAdmin only: Change request pertaining to error detected