-
Notifications
You must be signed in to change notification settings - Fork 152
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
feat: Add port number feature to build command #1346
base: main
Are you sure you want to change the base?
Conversation
Hi @plato79 👋thanks for taking on the issue and opening a PR! It looks like there are some failures in CI so please take a look at the output and get everything to green before we start the review process. Thanks! |
vars was initialized with "var" though it should have been "final".
The only "problem" was the initialization of "vars" variable which I didn't change. I fixed it as final. It should now pass ci analyze step. Though some of the tests fails and I don't think it's because of my additions. |
Now, it's past anlalyze.. Though there is an error in prod_server_builder test. This one is a bit complex though, while the fix is very easy. The code below is the reason for the error.
There is a vars variable which has default ...until no variables are sent to here. Which makes Now the fix is easy as you can see. Just adding a null check fixes. But this time flutter says I shouldn't add a null check to a variable which shouldn't be null at all. While the code above fixes the problem and causes no problem, it probably will pop up in the ci analyze section as error just like the previous `"vars" should be defined as final" warning appears as error in analyze. Do you have any suggestion about this? |
Ok, that was not the cause. Still checking to see what the real problem here is. |
…"vars" When there are no "port" number defined in this test, it causes error. This fixes it.
This last commit should fix the error in the test. |
The failing tests are actually runs successfully if you execute the commands outside of the test. For example build_test fails, but if you run @tomarra Are you sure that these tests worked without problem before I made the change? |
Set the port parameter to 8080 if it's not supplied. This fixes the problems with tests which don't provide port number.
I think this is ready for merge. What do you think? |
Hi @plato79! I've added this to the review column for the next iteration (May 18 to May 31). Hopefully we get to review it by then 🙌 |
Hi @plato79 👋 I got this PR updated with |
@@ -14,7 +14,7 @@ final dartFrogProdServerBundle = MasonBundle.fromJson(<String, dynamic>{ | |||
{ | |||
"path": "build/bin/server.dart", | |||
"data": | |||
"Ly8gR0VORVJBVEVEIENPREUgLSBETyBOT1QgTU9ESUZZIEJZIEhBTkQKLy8gaWdub3JlX2Zvcl9maWxlOiB0eXBlPWxpbnQsIGltcGxpY2l0X2R5bmFtaWNfbGlzdF9saXRlc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nRleHQse3sjZGlyZWN0b3J5X3BhcmFtc319e3sufX0se3svZGlyZWN0b3J5X3BhcmFtc319e3sjZmlsZV9wYXJhbXN9fXt7Ln19LHt7L2ZpbGVfcGFyYW1zfX0pKXt7L3dpbGRjYXJkfX17ey9maWxlc319OwogIHJldHVybiBwaXBlbGluZS5hZGRIYW5kbGVyKHJvdXRlcik7Cn0Ke3svZGlyZWN0b3JpZXN9fQo=", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do not manually update the bundles, can you revert this change? The bot will take care of updating the bundle after the PR is merged.
Hi @plato79 this seems silent for a while, are you still able to complete the effort? |
Sorry, because of my "paying" work, I couldn't concentrate on this for a while. I'll try to fix it tomorrow. |
Status
READY
Description
Added the port number to the build option for #1327
Type of Change