-
Notifications
You must be signed in to change notification settings - Fork 56
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
Unable to build Dlangide #398
Comments
|
Yes, this is the exact error I had. BTW It compiled on my 64 bit windows 7 laptop. However, the dmd compiler on that computer has not been upgraded and is running the version 2.083.0. Although, I do not know for sure if the cause is in the compiler, in phobos or in dlang. I took a look at the three lines in the dlang project.d file. It appears to be all the same error. I am not familiar enough with mixins to know for sure how to fix it. Does anyone have any ideas? |
On dmd 2.084.0-0 I fixed it by editing /usr/include/dmd/phobos/std/functional.d and adding in import std.ascii; Compile fine, runs fine. |
I thought of that one also. However, it only fixes it for the single individual. It would be better I think to fix it in the dlangide package file "project.d". I will eventually try to do that since I do have a local clone of the github repository. I am reserving the fix by modifying the /usr/include/dmd/phobos/std/functional.d file as a secondary plan. |
I really feel it would be best the fix the three nearly identical functions in the repositories file dlangide/src/dlangide/workspace/project.d. I don't know much about templates or mixin but I will try it in my local repository, test the change in linux and windows 7 and then seeing if buggins whats to include the changes. Or maybe someone will fix it before I get to it. |
I replaced Seems to work. Edit 2: |
I fixed it by adding the import std,.ascii : isAlpaNum to the top of the project.d file then using a lambda instead of the mixin in the three functions. Like this: import dlangide.workspace.workspace; // return reduce!q{ a && (b == '' || b == '-' || std.ascii.isAlphaNum(b)) }(true, s);
It compiles and runs on Linux. I have not tried compiling on Windows 7 yet and I have not tried the unitest yet. Both are on my "todo" list. Probably be doing that tomorrow. |
Sorry the changes to the first function did not paste as code, but you still get the idea I hope. |
The result of running "dub test" in the Dlangide folder was: I may not have time to test it in Win 7 today and I do not normally do development on my Win 10 machine, so I would have to install dmd and dub on it to test. |
I am sorry that it has taken me so long to check it on a Windows 7 computer. But at first it didn't compile because of a different error. The error happened because in the time it took between building on Linux and building on Windows the emsi-container developers changed the library to fix an issue with the LDC compiler. The LDC fix broke the windows Dlangide build when I tried on Windows 7. There is a pull request to fix the Windows version, but I do not know if has been committed and released yet, but I implemented the change in my local repository of emsi-containers and Dlangide builds OK on Windows 7. For some reason it will not build and run the default test because of 16 unresolved linking errors. I |
Now since I am unfamiliar with the protocol of what to do next. We have two viable solutions and I am unsure how to proceed. Do I submit a pull request and which solution do we offer to be committed by buggins. |
I don't normally use git. I normally just fetch it with dub. However, I do have a Git Manual so I am willing to try and clone the repository and submit a pull request. I like my solution although HugoHugoson's second also works at least for ascii characters. I do not know unicode since it was before my time so I do not know if it would work in other languages. |
I checked the phobos documentation and std.ascii : isAlphaNum returns true for ascii characters and false for unicode characters. Duh it is in the name std.ascii, but I had to check it to make sure. Blame it on my OCD. I did think of another way to fix this based on HugoHugoson's first idea. // a private helper function // then replace the std.ascii.isAlphaNum(b) in the 3 mixins with It should work and has the advantage that it retains the use of the string mixins and does not use lambda functions, since Vadim I assume choose string mixins over lambda functions for a reason. I havn't tested this solution yet but I have forked and cloned the repository preparing to make a pull request. What does everyone else think? |
I'd say as long as you test if feel free, they can always decline it if it's not what they want. However I'd really think it'd be great if the people who run this project would give some form of response considering this isn't exactly a small issue, it prevents some people entirely from compiling. I tried your proposed solution and I just get " |
I agree about the lack of responses by the project manager on the issues. "I wish to sort an array by calling a template function on a struct. In essence I want to do
but I get the error message
Is there anyway I can get Example: https://run.dlang.io/is/9zDfdd foos.sort!((a,b) => a.get!Dummy < b.get!Dummy); String functions can't access the local scope, and thus can't see Dummy. Using lambdas works. A additional comment was added by another person They're actually still useful in cases where you need to compare lambdas Notice that the error message is simular to yours and is on the same phobos file as the one that starts the function trace for this issues error also. |
I still have problem.
Can not build - here's log file |
I am not sure it is a Phobo's bug per se. In my research of this problem I found that you can not put a reference to an import in a string mixin like the developer did, because the string mixin does not have access to the scope outside itself. I just rewrote the string mixins into a lambda function as in a previous post on this issue. (see above). It is my understanding that the developer merged the pull request that fixed this issue. Perhaps you have an older version and need to fetch again with dub or clone it again with git which ever method you are most familiar with. According to your file log.txt this is exactly the error I had so the fix to the project workspace.d should work. |
Better fix in a PR#409 Checked @ Win32, dmd 2.092.1 |
Got multiple errors when building dlangide on 64 bit Linux using dub and dmd 1.084
The text was updated successfully, but these errors were encountered: