Comments (13)
@andrea-magni ... maybe it's good idea to close this task too, because bug is fixed. If you want I can copy our discussion about Continuous Integration to new issue. You should mark those issues with [discussion] tag and with [help wanted]
from mars.
@andrea-magni about the labels - nice article: norgepaul/TChromeTabs#69
New labels:
- discussion #CA1F7C
- the color is the same like question label
- good first issue #6E46FF
- something easier then help wanted and help wanted is more convenient for the discussion issue, for the documentation both are very useful, for the bugs - help wanted or discussion if you want to discuss things, for new features discussion is the best
- on hold #D2DAE1
- very important to show to the community that you are aware about the problem it you have to move to the task (bug / feature) for later
- invalid #D2DAE1
- out of the project scope
- feature #93CE55
- I like this more then the enhancement label, because it's more precise
from mars.
You are missing a uses: MARS.Core.MessageBodyWriters.
Adding the uses will register MessageBodyWriters (in your application there are none so the request actually succeed but the result value is not serialized to the response).
I am going to add an exception to handle this case. If the method is a function (and not a procedure) and no serializers are available, you think you should get an error.
As an aside, I have seen more than once that you are using a browser (and referring to REST methods as web pages). This is something I generally discourage and I tend to suggest using a REST debugger instead (Embarcadero's one or Postman, but there are many). There is so much more control on the request and on its conten, you can easily replay request and you can get some insights you would not be able to see with a browser (even if Chrome Dev Tools are great).
from mars.
Now you get a 500 Internal Server Error with this body as error message:
MessageBodyWriter not found for method SayHelloWorld of resource THelloWorldResource
Thanks for spotting this :-)
from mars.
About testing: MARS currently has some unit tests (see https://github.com/andrea-magni/MARS/tree/master/tests ) and I am quite interested in building a set of integration tests and setup an automated system. I do have a Linux machine in the cloud so I can try to setup a webhook for git commits having that machine pull the repo, build the test project, execute and report results.
Will think about this.
from mars.
Yeep! It wasn't a regression bug, but last week this sample was working even without MARS.Core.MessageBodyWriters, because of that I was thinking that is a regression. After adding MBW now everything is fine.
Idea of rising an expression is great and for sure will be very helpful for newcomers. I can verify this after you will commit my master with PR #39. I've got an idea how to organize better with things like registration of [Message Body Writer] or [JSON Token], which are rather internal, but have to rethink that more. When I will be sure then I register new issue for that.
from mars.
I have seen more than once that you are using a browser (and referring to REST methods as web pages). This is something I generally discourage and I tend to suggest using a REST debugger instead (Embarcadero's one or Postman, but there are many).
I know Postman and was using this a lot, even CURL is OK for me. Now I switched to VS Code and its great extension https://github.com/Huachao/vscode-restclient/ which is amazing for me. Despite this I'm trying to work as a common Delphi programmer which is more used to Web Browser then to other more convenient tools. This effect "easy of use" for newcomers is very important in my opinion.
from mars.
I am quite interested in building a set of integration tests and setup an automated system. I do have a Linux machine in the cloud
I'm quite interested too ... then there are two of us, but I'm more then sure then you will require Windows cloud host, because of the compiler. For the continuous integration you will need to:
- fetch commit with git (Linux is fine for that)
- compile source code (Win machine is required)
- report any compilation errors
- run compiled DUnitX app/apps (probably Linux is fine for that, but I'm not sure)
- report integration tests log
from mars.
Oh well, yes, I didn't think twice about compiler. Of course we need a Windows machine somewhere.
I used to have a Windows VPS but then switched to a Linux box. Will consider using a spare Windows machine of mine. Where one would report errors? I can think about having a Slack channel or publishing data somewhere on the web... other ideas?
from mars.
There is better solution. It requires some tricks to cover, but I was using it before with JavaScript GitHub project when I was contributing in it. The answer is Jenkins. It works almost magically. When anyone adding a new commit to the Pull Request then GitHub via webhook notifies Jenkins, installed somewhere in the cloud, that it's time to work and GitHub is waiting for the Jenklns response to accept this commit. Of course Jenkins is doing hard work.
Some interesting articles for that:
- https://www.valuebound.com/resources/blog/continuous-integration-using-jenkins-and-github-to-automate-deployment
- https://www.blazemeter.com/blog/how-to-install-jenkins-on-windows
I can get on my own to test and configure everything, but not in the November.
from mars.
To be more Delphi way you can as VSoft team about integration with GitHub
https://www.finalbuilder.com/continua-ci
I'm sure that is possible and maybe they've got access to GitHub webhook.
from mars.
I found something interesting for Linux box, but it's extremely tricky: docker container with Windows Server Core and inside manually copied Delphi Compiler:
- https://hub.docker.com/r/microsoft/windowsservercore/
- http://delphi.wikia.com/wiki/Setting_up_a_Delphi_Build_Machine
However, there are no guarantees or confirmation that such a thing may work. Maybe Marco knows something about that :-)
from mars.
Done, I also added the "in progress" one, yellow.
from mars.
Related Issues (20)
- Understanding "DefaultMARSJSONSerializationOptions.DateIsUTC" HOT 3
- Rate limiter HOT 1
- Issue with TObject and TArray<TObject> deserialization
- GET method to upload a file HOT 2
- Memory leak in TJSONObjectHelper.WriteStringValue HOT 1
- OpenAPI 3 schema serialization: property serialization order HOT 1
- Installation fails HOT 3
- OpenApi 3: no bodyparams exported HOT 1
- OpenAPI 3 broken if " DefaultMARSJSONSerializationOptions.SkipEmptyValues := False; "
- on Linux64: TJSONObjectHelper.ReadBoolValue can't get right value
- Multiple problems on Linux platform.
- Special use case of NULL field value HOT 2
- If CORS is enabled, the Access-Control-Allow-Methods are missing the PATCH method
- ThreadPoolSize HOT 1
- MARS change the request url if it finish with a slash
- [DCC Fatal Error] Net.CrossSocket.pas(21): F2613 Unit 'Net.CrossSocket.Epoll' not found. HOT 1
- Compilation fail if you use MARS.Utils.ReqRespLogger.Memory HOT 1
- Error compile in Delphi 12 HOT 1
- Memory Leak found HOT 2
- New resource for document API in StopLight format HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mars.