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

Paths are inconsistent #6108

Closed
tsuf239 opened this issue Apr 1, 2024 · 1 comment
Closed

Paths are inconsistent #6108

tsuf239 opened this issue Apr 1, 2024 · 1 comment
Labels
🐛 bug Something isn't working 🛠️ compiler Compiler 📚 libraries Wing Libraries

Comments

@tsuf239
Copy link
Collaborator

tsuf239 commented Apr 1, 2024

I tried this:

my file tree is:

tf-generator:
    backend:
          - main.w
    public:
         (many website files)

I am trying to compile this code:

let website = new vite.Vite(
  root: "../public",
);

This happened:

it works from within tf-generator/backend
with wing compile main.w

but doesn't from within tf-generator
with wing compile backend/main.w

I expected this:

to take the path relative to the main file/ to the file it's written at

Is there a workaround?

changing the path and be consistent of the compilation source

Anything else?

No response

Wing Version

0.66.5

Node.js Version

No response

Platform(s)

No response

Community Notes

  • Please vote by adding a 👍 reaction to the issue to help us prioritize.
  • If you are interested to work on this issue, please leave a comment.
@tsuf239 tsuf239 added the 🐛 bug Something isn't working label Apr 1, 2024
@Chriscbr Chriscbr added the 🛠️ compiler Compiler label Apr 1, 2024
@staycoolcall911 staycoolcall911 changed the title paths are inconsistent Paths are inconsistent Apr 13, 2024
@staycoolcall911 staycoolcall911 added the 📚 libraries Wing Libraries label Apr 13, 2024
@Chriscbr Chriscbr added this to the Winglang Stable Release milestone Apr 13, 2024
@MarkMcCulloh
Copy link
Contributor

Resolved by #6443 with @dirname which can be used to create paths relative to the current source file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working 🛠️ compiler Compiler 📚 libraries Wing Libraries
Projects
Archived in project
Development

No branches or pull requests

4 participants