Repository navigation
Feature Request: Conditional Database connections for compilation #600
Replies: 5 comments 1 reply
|
I would say that the compilation hooks are meant for that. I've seen multiple Progress development environment, they all have their own rules on how to compile modules with a specific propath, or set of database connection, or .Net libraries or weird options. Adding configuration would be an endless race against all exotic Progress configurations. Tagging @cverbiest or @lievendf in case they want to share their experience on this topic, I think you're using the compilation hooks to compile with a different runtime. |
|
Moved to discussion, as it's unllikely to become an enhancement. |
|
Thank you @gquerret. I didn't realize the pre compile hooks could be used in this way. |
|
I'm currently using profiles with different propath / database connections for some of the tricky compilation . Connecting/disconnecting databases could be a performance issue if you need to change it a lot. Did a quick connection test local localdata -RO -1 and it only takes 20 ms, so this is probably not an issue. |
|
@gquerret I was able to build a custom precompile hook that connects and disconnects DBs based on the filename using local dbs Eg: I have two files, xtest1.p and ytest2.p; one connects to xxdb, and the other connects to yydb. The compile works when you run save on the file, which triggers the full compile. Just compile xtest1.p by saving the program. Switch to ytest2.p and run the check syntax command. This fails unless you save the file, which will cause the full compile. I think this is probably caused by the check syntax command sending the entire editor text to the language server instead of the filename. |
Uh oh!
There was an error while loading. Please reload this page.
Hi team,
I work in an environment(qaddb with other dbs) where there are sometimes different dbs being used for different programs in the same project. This does cause the file to not compile when using the standard db connections defined in the profile.
I currently get around this by having multiple profiles. And switch to the one I need when I need to work on that program.
What I am thinking of as a feature is something that allows for compile statement to be run with different db connections. The db connection could depend on a glob pattern based system, where you define a pattern/exact name and list the dbs you want to use while compiling the file. or you could also add annotation in the program header to use specific db.
This could also be really useful when doing entire project rebuilds.
I think it might need names for the db connections and a new pattern file.
This feature probably needs more refinement but it would be really useful for me and a lot of other people with similar situation as me.
All reactions