From clangd-dev at lists.llvm.org Tue Feb 1 09:25:10 2022 From: clangd-dev at lists.llvm.org (Tanya Lattner via clangd-dev) Date: Tue, 1 Feb 2022 09:25:10 -0800 Subject: [clangd-dev] Mailman->Discourse Migration on February 1, 10am PST In-Reply-To: <6B90B043-DD04-4D39-A467-191AF3DDF5C8@llvm.org> References: <6B90B043-DD04-4D39-A467-191AF3DDF5C8@llvm.org> Message-ID: As a reminder, this will be happening this morning. Thanks, Tanya > On Jan 29, 2022, at 8:21 AM, Tanya Lattner wrote: > > LLVM Community, > > As referenced in this blog post , we are getting close to the deadline for migration for some Mailman lists to Discourse. If you are receiving this email from a LLVM Mailman list, then this list will be migrating to Discourse on February 1st. > > We have gone through several test runs and feel that we are ready to do the final migration on February 1st starting at 10 am PST. Once the migration begins, the impacted Mailman lists and Discourse will be read only until it has completed. > > Here are the steps of the migration process on February 1st at 10 am PST: > The Mailman lists that are migrating will be placed in “read-only” mode. No mail will be accepted to the list. > Mailman will be shut down while the final archives are collected. We expect this downtime to be about 15 minutes. > The mailman archives are sent to Discourse for migration (15-20 minutes for data transfer). > The LLVM DIscourse is put into read-only mode. Given the size of our archives, we expect the import to take 5 hours. > Sanity-checks will be made to ensure that everything looks as expected. We estimate this will take 1 hour or less. > The LLVM Discourse will be opened up again with all the archives imported. > We will post on Discourse about how things went and any next steps in the “Announcements” category. > > We will use the Discourse Migration website to communicate where we are in the process. > > We expect the LLVM Discourse to open by 5pm PST, but realize that even in the best plans, there may be unexpected situations that arise that cause the migration to take longer or possibly be stopped. If that occurs, we will evaluate the best course of action and communicate to the community as described above. > > If you have any questions, please let me know. > > Thanks, > Tanya > -------------- next part -------------- An HTML attachment was scrubbed... URL: From clangd-dev at lists.llvm.org Tue Feb 1 09:54:34 2022 From: clangd-dev at lists.llvm.org (Sam McCall via clangd-dev) Date: Tue, 1 Feb 2022 18:54:34 +0100 Subject: [clangd-dev] #line directives not considered in clangd In-Reply-To: <8c638129-d6e0-8bdf-e37c-3d7bcc768f48@gmail.com> References: <8c638129-d6e0-8bdf-e37c-3d7bcc768f48@gmail.com> Message-ID: FYI this mailing list is going away very soon (hours), replaced by llvm.discourse.group. Clangd handles locations in many places for various features - are you only concerned about diagnostic locations or other features too? It'd be useful to file a bug with details (a minimal example, how you expect it to behave). https://github.com/clangd/clangd However I can imagine what you want may be a lot of work/infeasible: - Clang only needs to print the filenames where it claims the source is from, while clangd needs to point at a location in an actual file that the editor will display. In general #line directives can (and do!) point at files that don't exist or are out-of-sync with the files we're parsing. - Clangd is designed to be used interactively while editing. If diagnostics appear in foo.newlang, but editing foo.newlang doesn't cause them to update, this is confusing. - Clangd manipulates locations for output in many places for various features. It's likely we'd need to add #line handling on a case-by-case basis to each feature (many features require locations/ranges to properly nest, which #line doesn't guarantee). - Clangd really targets C-family languages supported by clang - doing small cleanups to better support other use cases makes sense, but we can't really justify adding much complexity for this. On Tue, Feb 1, 2022 at 6:38 PM Benedikt Weiß via clangd-dev < clangd-dev at lists.llvm.org> wrote: > Hello, > > I am currently using the clangd for writing my own language server > implementation for a new programming language, let's call it newlang. > > In this new programming language, it is possible to write C++ source > code in specific places, so it is possible to embed C++ code in specific > syntax constructs. Afterwards the files are compiled to C++ to use the > normal C++ toolchain. > > As you can imagine, the embedded C++ from the original file is now also > contained in the generated C++ file but in other places (at other line > numbers etc because of additional generated C++ code). So, the embedded > C++ source code which was at, for example, line 52 (in the original file > of the new programming language) is now at line 132 in the generated C++ > file. > > To generate meaningful compiler messages, those places in the C++ file > are annotated with #line directives which link back to the original file > because you do not want to edit and analyze *generated* files but the > original source file in the new programming language. > > So, if I am using the standalone clang compiler, everything is correct > and as expected: > > benedikt at fedora:~$ clang /path/to/example_file.cxx > /path/to/example_file.newlang:39:9: warning: expression result unused > [-Wunused-value] > > because of something like > > #line 22 "/path/to/example_file.newlang" > > in the generated example_file.cxx. This is correct because the > example_file.cxx is generated from the example_file.newlang and "links > back" to the original location of the C++ source code, via those #line > directives. > > Now my question is: How can I get the *clangd* to recognize/consider > #line directives? I could not get it to work. clangd seems to ignore > them. clangd compiles the file correctly and generates > "publishDiagnostics" with the same warning and error messages etc but > without considering the #line directives, it only considers the line > numbers from the C++ file (in this example_file.cxx it would be like > line 132). > > I also tried "-fuse-line-directives" but without success. > > > Thanks you for your time. > > > > > With kind regards, > > > Benedikt Weiß > > > > > > _______________________________________________ > clangd-dev mailing list > clangd-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/clangd-dev > -------------- next part -------------- An HTML attachment was scrubbed... URL: