epics-containers / ibek

IOC Builder for EPICS and Kubernetes
https://epics-containers.github.io/ibek
Apache License 2.0
10 stars 4 forks source link

no schema generated for new custom support module #169

Closed amichelotti closed 3 months ago

amichelotti commented 5 months ago

Hello, I'm trying to add a simple ibek support for an 'external' non epics repo. In particular caenels easy driver support. To reproduce:

git clone https://github.com/amichelotti/ibek-support.git  --recurse-submodules

Then inside the container:

ibek ioc generate-schema

I dont see nothing related the caenels.. added, even if the module is correctly compiled. I thing there could be something related with the name that contains '-'. In addition it could be useful (if it's not implemented yet) to rename a support module. I'm not sure that:

ibek support git-clone --org https://github.com/CAENels/ ${NAME} ${VERSION}

supports renaming of ${NAME} in something different. Thanks, Andrea

gilesknap commented 5 months ago

Hi @amichelotti this is probably because of that recent breaking change in ibek.

It now needs the folder name for generate-links.

See example here https://github.com/epics-containers/ibek-support/blob/main/modbus/install.sh

gilesknap commented 5 months ago

We could support renaming the module - why so you want to change it? It seems clearer to keep the repo name the same as the module name if possible.

amichelotti commented 5 months ago

Ok I realigned, thanks! However to make it working I renamed the directory in the ibek support equal the name of the git project from I get the module. Otherwise It seems I get a compilation error. Sincerly, If I understood correctly, I think this is a limitation, because if the original developer of an epics module chooses a bizarre or inappropriate git project name you inherit this name in the ibek support then in the ioc instantiation. For instance the git project name for this caen support is 'easy-driver-epics' if I have to call my ibek module in the same manner 'easy-driver-epics' my ioc instance that drives power supplies caen will be: easy-driver-epics. that I find misleading and wird.

gilesknap commented 5 months ago

@amichelotti I just tried this and it worked for me.

However, if you already made the support module there will be a link to the old folder/name of your support yaml in /epics/ibek-defs - this is where ibek looks for yaml to make the schema from and you will get a failure until you delete the broken link.

It would be nice if the devcontainer was robust to such changes. But it is true to say that this would not have been an issue if you had rebuilt the container.

Give this a go and if it does not work please push the broken version to a branch and send it to me so I can work out a fix.

image

gilesknap commented 3 months ago

I think we can close this one. Please respond if there is still an issue here. Thanks.