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

Fix broken file path in generated mapper file on Windows #174

Merged
merged 1 commit into from
Apr 10, 2024

Conversation

realth000
Copy link
Contributor

@realth000 realth000 commented Feb 23, 2024

Fixes #173

The relative method from path package does not offer an option to change the path separater so I replaced all \ with /.

I tried to run flutter test on my machine but meets this error:

00:00 +0: loading C:/Programming/Projects/dart_mappable/packages/dart_mappable_builder/test/simple_model_test.dart                                                                                                                                            Shell: [ERROR:flutter/shell/common/shell.cc(117)] Dart Error: error: import of dart:mirrors is not supported in the current Dart runtime
Shell: [ERROR:flutter/runtime/dart_isolate.cc(144)] Could not prepare isolate.
Shell: [ERROR:flutter/runtime/runtime_controller.cc(462)] Could not create root isolate.
Shell: [ERROR:flutter/shell/common/shell.cc(669)] Could not launch engine with configuration

So... test with CI.

Update:

CI passed here

@realth000
Copy link
Contributor Author

@schultek
Hi! Anything I need to do?
I don't know why CI passed in my fork but failed here on the same commit, with file not found on ubuntu error. I can't compare with the CI log in latest merged request because it expired.

@schultek
Copy link
Owner

schultek commented Apr 2, 2024

@realth000 did you see my comment above? Please test if this alternative also works.

@realth000
Copy link
Contributor Author

realth000 commented Apr 2, 2024

@realth000 did you see my comment above? Please test if this alternative also works.

Sorry I still can't see the comment. Is it in this page or "Files Changed" tab or the issue page?

@schultek
Copy link
Owner

schultek commented Apr 2, 2024

Sorry I still can't see the comment. Is it in this page or "Files Changed" tab or the issue page?

Oh totally my fault, I made the comment by still needed to "submit" the review 🤦‍♂️

@realth000
Copy link
Contributor Author

Got it, I will check it tomorrow when I come back home.

@realth000 realth000 reopened this Apr 5, 2024
@realth000
Copy link
Contributor Author

realth000 commented Apr 5, 2024

@schultek I tested .posix on Windows10 and Arch linux, both got part of '../main.dart'; and worked fine. Also looks much better than .replaceAll.

Also worked without the config: part of 'main.dart';

@schultek
Copy link
Owner

schultek commented Apr 5, 2024

Thanks

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.02%. Comparing base (94b69f6) to head (01cbd4d).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #174   +/-   ##
=======================================
  Coverage   87.02%   87.02%           
=======================================
  Files          24       24           
  Lines         902      902           
=======================================
  Hits          785      785           
  Misses        117      117           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@schultek schultek merged commit 4777e79 into schultek:main Apr 10, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Broken file path on Windows in mapper file when the generated dir changed
3 participants