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

Add AppVeyor for testing on Win #26

Open
YanLobat opened this issue Feb 27, 2017 · 11 comments
Open

Add AppVeyor for testing on Win #26

YanLobat opened this issue Feb 27, 2017 · 11 comments

Comments

@YanLobat
Copy link

It seems there are some troubles with path resolving on Windows
import BPage from 'b:b-page';

It will eat Win slashes and path to this block won't be resolved.

@awinogradov
Copy link
Member

You can try and write your results here. But we use nodejs api for path building and we believe it have to work right.

@YanLobat
Copy link
Author

@awinogradov I wrote here, cause I've tried already :)
I am in proccess of understanding right now. If I find anything, I'll make PR.

@awinogradov
Copy link
Member

Ok) we can wait)

@YanLobat
Copy link
Author

В общем решил этот ишью для себя, захотел сделать PR и обнаружил, что у меня версия 0.0.2 :)
Код немного изменился, но проблема была примерно в этом месте.
Path нодовский, если ты на винде берет виндовый путь, потом в эти обратные слэши еще экранирование добавляется и в итоге в конечный require (который получается из подобного рода записей: import BPage from 'b:b-page';) доходит "обгрызанный" путь. А сам CommonJS как верно заметили юзает нормальные слэши(юниксовые), поэтому пришлось ввернуть следующую штуку перед возвращением значения .replace(/\\/g, "/");

Так что, наверное, можно закрывать, но на будущее иметь в виду :)

@Yeti-or
Copy link
Member

Yeti-or commented Mar 1, 2017

Let's keep this issue, and add CI for windows

@qfox qfox changed the title Was it tested on Win? Add AppVeyor for testing on Win Mar 3, 2017
@Guria
Copy link

Guria commented Aug 16, 2017

adding .replace(/\\/g, "/"); here works for me. Why it still not fixed?

Should I make a PR with this change?

@Guria
Copy link

Guria commented Aug 16, 2017

Hmm. I think "required-path" package is more suitable place to fix it.
cc @Yeti-or

@Guria
Copy link

Guria commented Aug 16, 2017

Ok. Investigated a bit more.
In fact both nodejs require and webpack require works well with windows separators in path.
Even with mixed ones like: require('./components\\App\\App.js');

The problems starts when we replacing node with requires using generators.
It returns wrong string, like require('./components\App\App.js')

I see now 3 potential places to put fix:

I like first one. The only problem I see here, is that purpose of required-path package will be a bit spoiled, since it's output works well now for any OS.
On the other side it seems that it's a generators job to prepare a valid output here.

What do you think guys?

@Guria
Copy link

Guria commented Aug 16, 2017

One more suggestion: Yeti-or/required-path#3 (comment)

@awinogradov
Copy link
Member

Still waiting for PR ;)

@Guria
Copy link

Guria commented Sep 4, 2017

still waiting an answer from @Yeti-or

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

No branches or pull requests

4 participants