Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

~/.sysl breaks module root discovery #1008

Open
anzdaddy opened this issue Aug 16, 2020 · 1 comment
Open

~/.sysl breaks module root discovery #1008

anzdaddy opened this issue Aug 16, 2020 · 1 comment
Assignees
Labels
bug P0 Highest priority: important or urgent

Comments

@anzdaddy
Copy link
Member

anzdaddy commented Aug 16, 2020

Please do not post any internal, closed source snippets on this public issue tracker!

Description

The name .sysl is being used for two different purposes

  1. The ~/.sysl directory is where Sysl caches stuff.
  2. A .sysl sentinel entry in a repo denotes the root of a sysl module.

Since practically all users work with repos under their home directory, these two purposes are almost certain to come into conflict.

Steps to Reproduce

  1. Ensure that ~/.sysl is present.
  2. sysl pb --mode=json somefile.sysl | grep file

Expected behavior

...
          "file": "./somefile.sysl",
...

Actual behavior

...
          "file": "a/path/relative/to/my/home/directory/somefile.sysl",
...

Your Environment

$ sysl info
Build:
  Version      : v0.185.0
  Git Commit   : 2a486a10550284976d08a7002d0f7b296a45da6e
  Date         : 2020-08-16T10:25:55Z
  Go Version   : go1.14.3 linux/amd64
  OS           : linux/amd64
@anzdaddy anzdaddy added the bug label Aug 16, 2020
@anzdaddy anzdaddy added the P0 Highest priority: important or urgent label Aug 16, 2020
@anzdaddy
Copy link
Member Author

anzdaddy commented Aug 16, 2020

A partial fix is use .git as a hard stop. If no .sysl has been found, but .git has, then a root is not defined.

The long term fix is to rename ~/.sysl. Perhaps ~/.sysl-cache, though future uses might render that suboptimal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug P0 Highest priority: important or urgent
Projects
None yet
Development

No branches or pull requests

2 participants