-
Notifications
You must be signed in to change notification settings - Fork 89
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
PHP language support #48
Comments
/bounty $1500 |
/attempt #48
|
@iamnamananand996 Do you want to attempt this bounty? |
@morgante can I get assigned? |
/attempt #48
|
hi @morgante, yes I am on it, look like a race now, 😃, let see who wins. |
@abhishek818 @urbit-pilled @iamnamananand996 I will assign this bounty to someone once they land the first main PR (ex. adding the grammar + parse test + initial metavariables). |
💡 @urbit-pilled submitted a pull request that claims the bounty. You can visit your bounty board to reward. |
@urbit-pilled asked about the prefix to use since PHP uses For now, just override the metavariable to something like Alternative, we can use |
The
Footnotes |
Hi @ayewo, thanks for flagging this. I think we probably want to use For toggling between them, we should use the |
Finally got metavariables to work in my PR, this commit contains the biggest changes I had to make: :197575d |
/assign @urbit-pilled |
@morgante I just submitted a pull request that solves this issue why are you assigning this to someone else? |
@digital-phoenix I'm sorry you went into the effort of submitting a pull request, but we can only award the bounty to one person. @urbit-pilled's PR is earlier and closer to completion. |
@morgante @urbit-pilled's test cases are not even generating abstract syntax trees yet it is just doing regex comparisons. In order for php to see text as code it has to be contained within php tags. My test cases work not just as regex comparisons but as actual code. |
I don't think |
@morgante I tested it before when I was adding php. Unless you use <?php the test will just be interpreted as text. Just using regex leads to issues such as not being able to match a function body when it is split across multiple lines. |
Language support is usually not completed in a single PR. I plan to merge @urbit-pilled's PR and award part of the bounty, but will award additional bounties for PRs adding more test cases and fixing associated bugs. |
@morgante @urbit-pilled's grammar file does not seem to even compile correctly. It seems to contain conflicts that have not been included in the conflict table I'm not convinced they have ever even used their own grammar file. Whereas my code includes support for a broad range of language features. |
If the grammar file wasn't used I don't see how the test cases could pass. This is an open source project, I prefer to have a collaborative community where we all focus on producing good code not tearing down each other's work. |
@morgante I understand the importance of collaboration but you're backing code that doesn't work properly over everyone else's efforts |
90% of the work is the same in your PRs. It would not be fair to discard the earlier PR, even if it is incomplete. As I noted, you will have an opportunity to add (and fix) more test cases for your share. For what it's worth, this is making me see the problems with the bounty model. We put this out as an experiment, but it's becoming a lot of trouble to manage. |
I was trying to point this out this very scenario playing out in Discord. Glad you've also come to the same conclusion—it can cause some bad blood for contributors and logistical headaches for projects that is completely avoidable. As I said, battle royale style, only works well if the bounty is a few hours of work. This is a multi-day PR. |
@morgante if you are going to have a public bounty either you need to accept whoever provides the first work that solves the requirements or you need to assign the task to someone. Most of the code will be the same because this project requires a lot of boiler plate to add a language. But the most important part the changes to the base grammar files are different. |
@ayewo battle royale style is a lot riskier but I think it can work okay as long as the submissions are easy to measure and are all compared against a well defined benchmark. |
@digital-phoenix As far as I know, I am not required to accept any pull request. If you prefer not to contribute to our repository, I understand, but I'm just trying to be fair to everyone. You knew there were already PRs open, that I was engaged with and reviewing, and chose to start a new PR anyways. I didn't assign it to anyone up front because, frankly, many contributors aren't prepared to work on something like this and I wanted to see material demonstration of ability before putting it on a single person. I have learned my lesson and will avoid big bounties in the future. |
@morgante if you base this off of whoever opens a PR first that just encourages people to open broken buggy PRs. Which will just make work for you. |
You may be testing an older version? Because the grammar file does compile correctly. And the test cases are not regex matches, and the php tags are optional if you set php_only as the default which was requested earlier in the comment thread. I think you started too late @digital-phoenix , because your PR doesn't implement the prefix change (^ instead of $) or support php without tags yet. I already finished what you did in the first day of my PR (get php working without prefix), however you did add more tests. Sumbitting a PR this late when someone else is nearly finished is bad, especially when you haven't fully fixed the issue or caught up to my progress yet. I am new to bounties and this is the first time I've had a bad experience with another bounty hunter trying to do this. |
Thanks @urbit-pilled for landing the main PR here. I'll award $1k from the bounty for that. There's still a bit more work to be done to consider this complete:
|
@morgante Algora has a command for making partial awards on GitHub. Simply add a comment on this issue with: Apologies if you already know this. |
/tip $1000 @urbit-pilled |
Thanks morgante, I'll work on the rest today. |
Tests cases that should work:
|
hey @morgante you need to click on the link posted by algora-pbc to award the tip. it hasn't been awarded yet. |
just added a test case for this in crates/core/src/test.rs
However instead of
|
/tip $250 @urbit-pilled |
@algora-pbc what are the correct commands to use when paying out a bounty incrementally? |
🎉🎈 @urbit-pilled has been awarded $1,000! 🎈🎊 |
🎉🎈 @urbit-pilled has been awarded $250! 🎈🎊 |
Thanks Morgante, I received the $1,250 tip. Anything else that needs to be done for the rest of this bounty @morgante? |
Hi @urbit-pilled, before we consider a language "complete" we usually like to try it on a few repos and run some sample migrations. For this to be complete, I think I'd like to see:
|
@morgante Anything left with this to complete the issue further. From conversations I have seen there is some part of bounty to add test cases more and increase test coverage. Would I proceed with it ? |
@varshith257 We haven't seen much PHP usage so I'm closing this out. No further bounty is available. |
We would like to support PHP as a language for matching against.
Review this guide and join us on Discord to discuss.
Acceptance criteria
The text was updated successfully, but these errors were encountered: