You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/10/10 06:33:03 UTC

[GitHub] [shardingsphere] sunkai-cai opened a new issue, #20041: Support build with windows

sunkai-cai opened a new issue, #20041:
URL: https://github.com/apache/shardingsphere/issues/20041

   ## Question
   
   I thinks we need to support build with windows, because has a large number of users with windows. 
   
   But,shardingsphere can't do that after [#19587](https://github.com/apache/shardingsphere/pull/19587)
   
   Now,shardingsphere the longest path of module is `shardingsphere-mode\shardingsphere-mode-type\shardingsphere-standalone-mode\shardingsphere-standalone-mode-repository\shardingsphere-standalone-mode-repository-provider\shardingsphere-standalone-mode-repository-jdbc\shardingsphere-standalone-mode-repository-jdbc-core`(length 269) and `\shardingsphere-mode\shardingsphere-mode-type\shardingsphere-standalone-mode\shardingsphere-standalone-mode-repository\shardingsphere-standalone-mode-repository-provider\shardingsphere-standalone-mode-repository-jdbc\shardingsphere-standalone-mode-repository-jdbc-h2`(length 267)
   
   Shardingsphere build with windows will fail when maven run test of surefire.
   
   ```
   [ERROR] Caused by: java.io.IOException: Cannot run program "cmd.exe" (in directory "D:\github\s\shardingsphere-mode\shardingsphere-mode-type\shardingsphere-standalone-mode\shardingsphere-standalone-mode-repository\shardingsphere-standalone-mode-repository-provider\shardingsphere-standalone-mode-repository-jdbc\shardingsphere-standalone-mode-repository-jdbc-h2"): CreateProcess error=267, 目录名称无效。
   [ERROR] 	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1143)
   [ERROR] 	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1073)
   [ERROR] 	at java.base/java.lang.Runtime.exec(Runtime.java:594)
   [ERROR] 	at org.apache.maven.surefire.shade.org.apache.maven.shared.utils.cli.Commandline.execute(Commandline.java:407)
   [ERROR] 	... 32 more
   [ERROR] Caused by: java.io.IOException: CreateProcess error=267, 目录名称无效。
   [ERROR] 	at java.base/java.lang.ProcessImpl.create(Native Method)
   [ERROR] 	at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:494)
   [ERROR] 	at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:159)
   [ERROR] 	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1110)
   [ERROR] 	... 35 more
   [ERROR] Fatal Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Flakes: 0, Elapsed timeout: false
   [ERROR] 	at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:671)
   [ERROR] 	at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:533)
   [ERROR] 	at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:278)
   [ERROR] 	at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:244)
   [ERROR] 	at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1194)
   [ERROR] 	at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1022)
   [ERROR] 	at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:868)
   [ERROR] 	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
   [ERROR] 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
   [ERROR] 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
   [ERROR] 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
   [ERROR] 	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
   [ERROR] 	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
   [ERROR] 	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
   [ERROR] 	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
   [ERROR] 	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
   [ERROR] 	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
   [ERROR] 	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
   [ERROR] 	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:957)
   [ERROR] 	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289)
   [ERROR] 	at org.apache.maven.cli.MavenCli.main(MavenCli.java:193)
   [ERROR] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   [ERROR] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
   [ERROR] 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   [ERROR] 	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
   [ERROR] 	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
   [ERROR] 	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
   [ERROR] 	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
   [ERROR] 	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
   [ERROR] 	at org.codehaus.classworlds.Launcher.main(Launcher.java:47)
   [ERROR] Caused by: java.io.IOException: Cannot run program "cmd.exe" (in directory "D:\github\s\shardingsphere-mode\shardingsphere-mode-type\shardingsphere-standalone-mode\shardingsphere-standalone-mode-repository\shardingsphere-standalone-mode-repository-provider\shardingsphere-standalone-mode-repository-jdbc\shardingsphere-standalone-mode-repository-jdbc-h2"): CreateProcess error=267, 目录名称无效。
   [ERROR] 	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1143)
   [ERROR] 	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1073)
   [ERROR] 	at java.base/java.lang.Runtime.exec(Runtime.java:594)
   [ERROR] 	at org.apache.maven.surefire.shade.org.apache.maven.shared.utils.cli.Commandline.execute(Commandline.java:407)
   [ERROR] 	at org.apache.maven.plugin.surefire.booterclient.lazytestprovider.OutputStreamFlushableCommandline.execute(OutputStreamFlushableCommandline.java:65)
   [ERROR] 	at org.apache.maven.surefire.shade.org.apache.maven.shared.utils.cli.CommandLineUtils.executeCommandLineAsCallable(CommandLineUtils.java:229)
   [ERROR] 	at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:611)
   [ERROR] 	... 29 more
   [ERROR] Caused by: java.io.IOException: CreateProcess error=267, 目录名称无效。
   [ERROR] 	at java.base/java.lang.ProcessImpl.create(Native Method)
   [ERROR] 	at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:494)
   [ERROR] 	at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:159)
   [ERROR] 	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1110)
   [ERROR] 	... 35 more
   [ERROR] 
   [ERROR] -> [Help 1]
   ```
   
   [ShardingSphere > FAQ](https://shardingsphere.apache.org/document/current/en/faq/#proxy-in-windows-environment-could-not-find-or-load-main-class-orgapacheshardingsphereproxybootstrap-how-to-solve-it:~:text=var2%3B%0A%20%20%20%20%7D-,%5BOther%5D%20In%20Windows%20environment%2Cwhen%20cloning%20ShardingSphere%20source%20code%20through%20Git%2C%20why%20prompt%20filename%20too%20long%20and%20how%20to%20solve%20it%3F,-Answer%3A) can't solve this problem.
   
   so, we need to make the module  path shorter.  


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] linghengqian commented on issue #20041: Support build with windows

Posted by GitBox <gi...@apache.org>.
linghengqian commented on issue #20041:
URL: https://github.com/apache/shardingsphere/issues/20041#issuecomment-1210358296

   I just noticed that there was a discussion about CreateProcessW in Zig Language too, but in the end it didn't get any feedback in the Windows community. So I opened a new one in the Windows Feedback Hub. Refer to https://aka.ms/AAhnzj2 .


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] github-actions[bot] closed issue #20041: Support build with windows

Posted by GitBox <gi...@apache.org>.
github-actions[bot] closed issue #20041: Support build with windows
URL: https://github.com/apache/shardingsphere/issues/20041


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] linghengqian commented on issue #20041: Support build with windows

Posted by GitBox <gi...@apache.org>.
linghengqian commented on issue #20041:
URL: https://github.com/apache/shardingsphere/issues/20041#issuecomment-1213084256

   Not sure if I should submit a PR to the FAQ page - as there is no echo from the windows community, I recommend that developers using Windows build the project via WSL+VSCode or WSLg+Intellij.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] Swastyy commented on issue #20041: Support build with windows

Posted by GitBox <gi...@apache.org>.
Swastyy commented on issue #20041:
URL: https://github.com/apache/shardingsphere/issues/20041#issuecomment-1214680746

   > I just noticed a strange phenomenon. Why the FAQ has been moved to Github Wiki, and the website still needs to keep the FAQ page? Reference https://shardingsphere.apache.org/document/current/en/faq/ .
   
   We are working on it, it will be removed in sometime, all the FAQs will be rendered only from the Github wiki


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] linghengqian commented on issue #20041: Support build with windows

Posted by GitBox <gi...@apache.org>.
linghengqian commented on issue #20041:
URL: https://github.com/apache/shardingsphere/issues/20041#issuecomment-1212292501

   I just noticed a strange phenomenon.  Why the FAQ has been moved to Github Wiki, and the website still needs to keep the FAQ page?  Reference https://shardingsphere.apache.org/document/current/en/faq/ .


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] linghengqian commented on issue #20041: Support build with windows

Posted by GitBox <gi...@apache.org>.
linghengqian commented on issue #20041:
URL: https://github.com/apache/shardingsphere/issues/20041#issuecomment-1213713374

   According to https://github.com/apache/shardingsphere/issues/19383 and https://github.com/apache/shardingsphere/issues/19513, the FAQ is being removed.  Apparently I don't have editing rights to the Github Wiki, other friends can submit a PR if they're interested.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] linghengqian commented on issue #20041: Support build with windows

Posted by GitBox <gi...@apache.org>.
linghengqian commented on issue #20041:
URL: https://github.com/apache/shardingsphere/issues/20041#issuecomment-1209658083

   - I am also concerned about this problem. After all, the limitations of compiling projects in WSLg are quite large, and some important fixes are still in the Microsoft Preview stage, which will bring a lot of trouble.
   
   - The information provided by the FAQ is too cumbersome, according to https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry, the first step should be to execute the command in powershell . 
   ```powershell
   New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" `
   -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force
   ```
   - But for the `application manifest` of the second step, it is neither processed in Maven Wrapper nor in Maven Core. Will this question come back to Maven?
   ```xml
   <application xmlns="urn:schemas-microsoft-com:asm.v3">
       <windowsSettings xmlns:ws2="http://schemas.microsoft.com/SMI/2016/WindowsSettings">
           <ws2:longPathAware>true</ws2:longPathAware>
       </windowsSettings>
   </application>
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] sunkai-cai commented on issue #20041: Support build with windows

Posted by GitBox <gi...@apache.org>.
sunkai-cai commented on issue #20041:
URL: https://github.com/apache/shardingsphere/issues/20041#issuecomment-1210082049

   [maximum-file-path-limitation](https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry) can't resolve this problem. 
   
   `java.lang.ProcessBuilder.start` be called when maven running junit. Then `ProcessBuilder` has use [CreateProcessW](https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-createprocessw) to fork a process.
   
   But, `CreateProcessW`  not in [MAX_PATH restrictions](https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry#:~:text=CopyFileW%2C%20CopyFile2%2C%20CopyFileExW,FindNextStreamW%2C%20GetCompressedFileSizeW%2C%20GetFinalPathNameByHandleW.)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] sunkai-cai commented on issue #20041: Support build with windows

Posted by GitBox <gi...@apache.org>.
sunkai-cai commented on issue #20041:
URL: https://github.com/apache/shardingsphere/issues/20041#issuecomment-1213208359

   hi @linghengqian , I using windows Intellij to work ,run junit with liunx 。
   
   WSL+VSCode or WSLg+Intellij is good idea. you can submit PR to the FAQ page,make it better.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] linghengqian commented on issue #20041: Support build with windows

Posted by GitBox <gi...@apache.org>.
linghengqian commented on issue #20041:
URL: https://github.com/apache/shardingsphere/issues/20041#issuecomment-1211109237

   - Just for extra confirmation, does the approach from https://github.com/jhipster/generator-jhipster/issues/8878#issuecomment-441796182 work? 
   
   - GraalVM Native Build Tools has done a lot of PR around the long path, which is finally shown as https://graalvm.github.io/native-build-tools/latest/maven-plugin.html#long_classpath_and_shading_support .
   
   - I just found out that the Windows Feedback Hub is actually regional and the link above should not work for some European friends.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] github-actions[bot] commented on issue #20041: Support build with windows

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #20041:
URL: https://github.com/apache/shardingsphere/issues/20041#issuecomment-1272348963

   Hello , this issue has not received a reply for several days.
   This issue is supposed to be closed.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] linghengqian commented on issue #20041: Support build with windows

Posted by GitBox <gi...@apache.org>.
linghengqian commented on issue #20041:
URL: https://github.com/apache/shardingsphere/issues/20041#issuecomment-1272359074

   - Has this problem really been solved?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] TeslaCN closed issue #20041: Support build with windows

Posted by GitBox <gi...@apache.org>.
TeslaCN closed issue #20041: Support build with windows
URL: https://github.com/apache/shardingsphere/issues/20041


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] TeslaCN commented on issue #20041: Support build with windows

Posted by GitBox <gi...@apache.org>.
TeslaCN commented on issue #20041:
URL: https://github.com/apache/shardingsphere/issues/20041#issuecomment-1364919789

   https://github.com/apache/shardingsphere/issues/21129


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org