require fails in lua script invoked by tt run
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 113
- Forks
- 18
- Avg merge
- 4d 11h
- Merged PRs (30d)
- 23
Description
Create two simple scripts:
- router.lua:
#!/usr/bin/env tarantool
-- Call a configuration provider
cfg = require('localcfg')
print(cfg)
os.exit(0)
- localcfg.lua in the same directory:
return {}
From any other directory try to run router with tarantool:
$ tarantool instances.enabled/crud_app/router.lua
table: 0x400134e0
and tt run:
$ tt run instances.enabled/crud_app/router.lua
Failed to run instance: instances.enabled/crud_app/router.lua, error: "instances.enabled/crud_app/router.lua:4: module 'localcfg' not found:
no field package.preload['localcfg']
localcfg.lua cannot be found.
After fixing this issue, please check that tt start also works with router application script.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the behavior with the router.lua and localcfg.lua scripts described in the issue, comparing tarantool with tt run. Start at the tt run and tt start entry points and trace how the application script is launched. Done means localcfg.lua is found when invoked from another directory and both tt run and tt start work with the router application script.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, lua
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100