Closed weissi closed 1 month ago
@swift-ci create
CC @aciidb0mb3r, can we adapt the generation so that it allows deprecated tests? They're really important.
I guess the hack used by NIO is our best option unless @briancroom has better ideas.
Comment by Petro Rovenskyy (JIRA)
@aciidb0mb3r, Based on PR feedback there was a suggestion to focus on compiler feature that allows disabling warning in sections of the code. My understanding it's something similar to what we have for Objective-C preprocessor)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
// actual code causing the deprecated warning
#pragma clang diagnostic pop
Is this assumption correct? Unfortunately, I do not have experience with the development of swiftc, and it would be awesome if you can clarify some possible action here.
In case such a feature will be implemented where the changes should go, to swiftPM's generated code (as was proposed on a first PR revision) or leave this option to the end-users(disable warnings in consumers code)?
Thanks in advance! cc @weissi
> Should I file a JIRA enhancement request or there is existing one we can link?
You can try doing a quick search on JIRA and file a new one if you can't find something.
> Is it possible to get some "pointers" in what direction to move and where to start with implementing such a feature?
I think this would first require going through the swift-evolution process in order to figure out what the right feature looks like. You can find out about the evolution process here: https://github.com/apple/swift-evolution
Duplicate of #3992
Additional Detail from JIRA
| | | |------------------|-----------------| |Votes | 2 | |Component/s | Package Manager | |Labels | Bug, Linux | |Assignee | 3a4oT (JIRA) | |Priority | Medium | md5: fc60a1ed0f31111134228b7e176436d5Issue Description:
It's very important to also test deprecated functionality which on Darwin is easily possible by deprecating the test method. When manually generating LinuxMain and friends, this is also possible via a small hack.
Repro:
Expected:
Runs the tests just fine like on Darwin or without
enable-test-discovery
Actual:
many errors.