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

Consider Exclusion directory in qtmoc or unicode absolute path #99

Closed
rashwell opened this issue Nov 8, 2016 · 2 comments
Closed

Consider Exclusion directory in qtmoc or unicode absolute path #99

rashwell opened this issue Nov 8, 2016 · 2 comments

Comments

@rashwell
Copy link
Contributor

rashwell commented Nov 8, 2016

So this isn't really qtmoc's issue, but it could help deal with windows issues.

Challenge:

  • Basically qtmoc is rifling through the app dir files and directories looking for stuff
  • Sometimes people manage projects and builds with things like gulp and node even when coding golang
  • This tends to put a node_modules directory in the app folder that is very deep with really long path names
  • qtmoc should try to ignore or have a method to ignore that directory. IMHO

Outcomes:

When qtmoc walks the file path into the node_modules directory depending on what is there on windows etc, it panics deep in golang filepath

Reason:

GO filepath os issues with long file name paths:

Options:

It makes sense to me to craft a method of excluding / blacklisting some directories that won't have anything in them related to qt / go / etc.

Alternatives:

  • It looks like based on the the two golang issues you can prepend a \?\ to the front of the absolute path for the appdir before you start the traversal and it will increase the limit on file length, but I don't know if that would work across os's or if this is a windows only bit.
  • Or just add a tip or a FAQ not to have things like "node_modules" in the project directory where qtdeploy/qtmoc etc get run.
@rashwell rashwell changed the title Consider Exclusion directory in qtmoc or unicode absolute pateh Consider Exclusion directory in qtmoc or unicode absolute path Nov 8, 2016
@therecipe
Copy link
Owner

Hey

Thanks for the suggestion :)

There is already a blacklist function in qtmoc https://github.com/therecipe/qt/blob/master/cmd/qtmoc/moc.go#L463-L472
(Sorry for the mess, I hadn't had time to cleanup the tooling yet)

Would you mind adding your fixes and send a pull request?

I think qtminimal has probably the same issue, but I didn't create the blacklist function there yet.

Thank you :)

@therecipe
Copy link
Owner

I blacklisted the "node_modules" dir in qtmoc and qtminimal with 0ffd648
and it seems Go 1.8 will support long absolute paths out of the box.

Thanks again :)

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

2 participants