You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a request for the importer to use './' as the default base_path if the dots ('.', '..', '...') do not precede the module name string so as to allow for cleaner module paths relative to the base path of the root project folder and not the source file itself.
Desired import statement from 'contrib_action_graph.jac'
import:jac from agent.action.exit_interact_action { ExitInteractAction }
Compatible import statement from 'contrib_action_graph.jac'
import:jac from ..exit_interact_action { ExitInteractAction }
Both of these should work, however, the first example is proposed and should have the importer use the base_path of the project root in the event no preceding '.' or '..' or '...' is found.
Why do we need this
Relative paths in larger Jaclang projects are tough to keep track of and manage. Mistakes are easily made with the number of dots required to relatively navigate folder depth.
In the case above, we plan to allow contributors to build and publish action modules for use within a larger jaclang program. In this case, it wold be preferred they use cleaner import paths for core jac files that are NOT relative to the module sourcefiles they are contributing.
The text was updated successfully, but these errors were encountered:
Summary
I have a request for the importer to use './' as the default base_path if the dots ('.', '..', '...') do not precede the module name string so as to allow for cleaner module paths relative to the base path of the root project folder and not the source file itself.
Examples
Consider the folder structure:
Desired import statement from 'contrib_action_graph.jac'
Compatible import statement from 'contrib_action_graph.jac'
Both of these should work, however, the first example is proposed and should have the importer use the base_path of the project root in the event no preceding '.' or '..' or '...' is found.
Why do we need this
The text was updated successfully, but these errors were encountered: