Closed devhawk closed 3 months ago
Can you go into more detail on why you think we should do this? process.cwd()
is the application package root, which is the natural place to which paths should be relative in my opinion.
cwd depends on user action, dbos-config file doesn't move very often. I ran into this when I was debugging transact but running an dbos application from another folder.
Can you give an example? Transact also implicitly assumes the config file is at process.cwd
, so I'm not sure how this change would help.
https://github.com/dbos-inc/dbos-transact/blob/397d295502c12e831addb8ca523a7a4da21b4f46/src/dbos-runtime/config.ts#L15 https://github.com/dbos-inc/dbos-transact/blob/397d295502c12e831addb8ca523a7a4da21b4f46/src/dbos-runtime/config.ts#L154
When I am working on a new transact feature, I create a VSCode launch config to run a separate DBOS application. I specify the full path to the config file via the --configfile
option. I used to also specify the entrypoint via the command line, but that option has now been replaced by specifying the entrypoints in the config file. So I have to hard code the full path in the config file so dbos start
can find it
If you specify a custom path to the dbos config file via --configfile
option, how will dbos transact find the entrypoint files unless they've been hard coded in the config file?
If you implement a new Transact feature, I think normally it'd be fine to run an app in a different directory with a different version. However, if I understand it correctly, dbos start
might not work if you implement some new features in decorators and want to use it in your app, because the original app is compiled with the old version of Transact.
However, if I understand it correctly,
dbos start
might not work if you implement some new features in decorators and want to use it in your app, because the original app is compiled with the old version of Transact.
Yup, I've hit that. I've used a combination of building apps against a local transact package and casting to address this.
Close this issue as we now have a better way to support running apps in a different folder.
Problematic logic is: https://github.com/dbos-inc/dbos-transact/blob/29fef96f71cfd694d9abbb799963b73675b9f98f/src/dbos-runtime/runtime.ts#L67