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
[SR-13237] Remove ModuleDecl::isClangModule() #55678
Comments
Feel free to ask for help if you'd like to tackle this and are having trouble building the compiler or need someone to review your PR something else. 🙂 |
@swift-ci create |
Comment by Matei Oprea (JIRA) Hi theindigamer (JIRA User) if this is a good starter bug, I can try to fix it. I've tried to find where isClangModule is being used by running grep -rnw '.' -e 'isClangModule' and I can see that it's being used in multiple components. Do you have any advice of how to tackle it? Thanks! |
Comment by Nikhil (JIRA) theindigamer (JIRA User)..I will work on SR-13245 and will un assign myself here. |
Comment by Matei Oprea (JIRA) Oh, sorry srinikhil07 (JIRA User). Didn't see that this was assigned to you. |
Comment by Nikhil (JIRA) mateioprea (JIRA User), No problem, my hands are full right now anyway. Please assign this to yourself and start working. |
Hi Matei! Are you using Xcode or are you using some other editor? Xcode does have functionality of finding all call-sites (IIRC it is called "Find Call Hierarchy"), so you don't need to use a regex search (also ripgrep is much faster than grep -rnw in case you want to try it 🙂). Another good way to do it would be:
(The Jira bullet numbering seems to be goofing up for some reason.) Let me know if you're having trouble building the compiler or following any of the steps. 🙂 |
Comment by Matei Oprea (JIRA) Hi Varun, I'm using Xcode, but I don't seem to find a xcode project in swift-source/build/Ninja-RelWithDebInfoAssert/swift-macosx-x86_64. I've followed the instructions in the readme and compiled using utils/build-script --release-debuginfo. Should I use something else for compilation? Also, I was just playing around and I had to stash the changes. Just to be sure, I need to be up to date with "master" branch, right? |
If you want to build for Xcode (you will need a recent beta) you can use the utils/build-script --release-debuginfo --xcode This will create an Xcode project in Yes, you need to be up-to-date with the master branch. |
Comment by Matei Oprea (JIRA) theindigamer (JIRA User) sorry it's taking too long. I got this when running with --xcode. But apparently, without using this the --xcode arguments everything works.
User defaults from command line: Build settings from command line: xcodebuild: error: 'cmark.xcodeproj' does not exist. I've already ran: sudo xcode-select -switch /Applications/Xcode-beta.app and Xcode-beta.app is Version 12.0 beta 3 (12A8169g). My setup is: Catalina 10.15.6 on MacBook Pro (15-inch, 2018). Anything that I can do? Thanks! |
Did you run Also, please don't apologize: we're not in a rush to fix this issue and I'm guessing you're contributing on your own time as a volunteer. |
Comment by Matei Oprea (JIRA) Yes, i did. I am able to build without passing --xcode as an option. I can also run the swift executable that's generated. The only problem seems to be when running with --xcode. I have also deleted the old clone, cloned the repo again and try to run: utils/build-script --release-debuginfo --xcode and still doesnt work. [108/3824][ 2%][16.787s] Building CXX object lib/DebugInfo/PDB/CMakeFiles/LLVMDebugInfoPDB.dir/Native/NativeTypeUDT.cpp.o Xcode beta has been downloaded today if it matters in any way. |
I'm afraid I can't tell what the issue is from the limited information. There was a similar issue reported here: https://forums.swift.org/t/compiling-swift-with-xcode-option-on-xcode-12-beta-3/38768 If you are facing the same issue (Swift builds for arm64), then you can change the |
Comment by Matei Oprea (JIRA) Varun, It worked with the following options: 1. upgrade to CMake 3.16.5 or later 2. run utils/build-script --reconfigure --release-debuginfo --xcode -~~clean ~~-extra-cmake-options="-DCMAKE_OSX_ARCHITECTURES=x86_64" Apparently it started building everything. Thank you. |
Comment by Matei Oprea (JIRA) Hi Varun, Rolling back to Xcode 12 beta 1 fixed the issue. Opened up a PR here: #33202 Also, one question: is there a way for compiling the code for swift again without compiling the entire modules base? I had to run swift/utils/build-script --release-debuginfo --xcode --extra-cmake-options="-DCMAKE_OSX_ARCHITECTURES=x86_64" every time. I tried with ninja swift-frontend, but I guess that doesn't work when first compiling with --xcode option. |
With an Xcode build, you can select the swift-frontend scheme from inside Xcode and build that for incremental builds. That will only build the compiler, not everything. With a Ninja build, you can go to the Ninja-RelWithDebInfoAssert/swift-macosx-x86_64 directory and run You shouldn't need to run build-script again after the first from-scratch build, unless there are some configuration changes (e.g. you changed the CMake since the last time you ran build-script). |
Comment by Matei Oprea (JIRA) theindigamer (JIRA User) now that this is done, any next steps? Do you have something else on your side that can be fixed? |
Comment by Matei Oprea (JIRA) If I'm trying to build from xcode, this is what happens: https://www.dropbox.com/s/poe1e2dsqdg05xw/Screen%20Recording%202020-07-30%20at%2020.30.48.mov?dl=0 I don't know if you have access to Dropbox. I can upload in another location |
Instead of using 'Automatically Create Schemes', you can do manually create schemes and select I'm not sure what you mean by next steps: are you asking about what needs to be done to fix the CMake configuration? Are you asking about other StarterBugs? Something else? Once the tests pass and the CI merges the PR, we can resolve and close this JIRA. |
Additional Detail from JIRA
md5: 391d6faee40b854813aa4ea3984c1ae5
Issue Description:
The method's name is awfully misleading. A function prefixed with
is
should not have side-effects. But this method does module loading!!! 🙁We should get rid of this method and replace call-sites with
isNonSwiftModule()
. I looked at the two uses and I think both of them are relying on it only for printing and not for module loading, so I'm somewhat confident the behavior is not going to change.The text was updated successfully, but these errors were encountered: