Skip to content
This repository has been archived by the owner on Jun 25, 2020. It is now read-only.

Run on Mono #253

Merged
merged 19 commits into from
Aug 10, 2015
Merged

Run on Mono #253

merged 19 commits into from
Aug 10, 2015

Conversation

thiagojedi
Copy link
Contributor

Hey guys. I recently read about this project and I was wondering if it runs on Mono.

I tried to run the .exe file and, joyfully, it worked. I mean, almost. It had some issues with the paths of the generated files but seems like all the libs were compatible. I saw you were working on it ( #215 ) and, as a Mono developer, I tried to figure out what was happening.

It was only a matter of fixing lower cases paths and using System.IO.Path instead of changing path strings.

I compiled on VS 2015 RT (Windows 10) and tested in my Xubuntu machine with Mono 4.0. I'm able to run commands hungry (no big deal here), create, bake and taste, both with Razor and Liquid templates. It worked and was delicious.

I had problems running the automated tests, though. And didn't test the "import" command. I need some help with that.

Anyway, hope it's usefull. :D

@shiftkey
Copy link
Member

@thiagoabreu this is amazing! Thanks for looking into this ❤️❤️❤️❤️❤️

There's some failing tests on this project - you can see the output here - have you had a chance to look into them?

@thiagojedi
Copy link
Contributor Author

I was having trouble with VS2015 skipping most of the tests. Thanks to AppVeyor I could find the failing tests.

Seems like I "over fixed" the "MapToOutputPath" methods. It looks good now.

Have a taste:

captura de tela_2015-07-20_20-26-59

@shiftkey
Copy link
Member

I'll let @laedit chime in here as he's been steering a bunch of this stuff recently.

Also cc @vikingcode as he was looking at Mono support earlier...

@thiagojedi
Copy link
Contributor Author

Found a bug in generating permalinks. Fixed now.

@thiagojedi
Copy link
Contributor Author

Fixing author (sorry, my bad)

@kodfodrasz
Copy link
Contributor

I suspect some related code smell at https://github.com/Code52/pretzel/blob/master/src/Pretzel.Logic/Extensibility/Extensions/AzureHostSupport.cs#L46 and in line 52. I think the replacement target should be changed to PathSeparatorChar.

@thiagojedi
Copy link
Contributor Author

Agreed. The output is the same but the SeparatorChar makes clearer understanding.
Changed in other places too for consistency.

@thiagojedi
Copy link
Contributor Author

[00:00:17] The process cannot access the file 'C:\projects\pretzel\src\packages\DotlessClientOnly.1.4.1.0\DotlessClientOnly.1.4.1.0.nupkg' because it is being used by another process.
[00:00:17] Command exited with code 1

Hey, @shiftkey can you see what happened? 😅

@laedit
Copy link
Member

laedit commented Aug 4, 2015

Sorry for the silence, I was out of town for a few weeks.
Thanks a lot for your hard work, I will review it as soon as I can, hopefully before the end of the week.

@laedit
Copy link
Member

laedit commented Aug 9, 2015

Sounds good to me, thanks again! 😃
I just have two questions:

  • could you merge this branch with the updated master?
  • did you know any good ci platform for mono? Is Travis ok?

Conflicts:
	src/Pretzel.Logic/Extensions/StringExtensions.cs
@thiagojedi
Copy link
Contributor Author

  • could you merge this branch with the updated master?

Done.

  • did you know any good ci platform for mono? Is Travis ok?

Travis is ok. The mono-project guys use Jenkins. The TeamCity also supports Mono.

Just a reminder, my branch does not compile on Mono. The mono compiler reflection can't find all the Command tags, making Pretzel useless.

@laedit
Copy link
Member

laedit commented Aug 10, 2015

Thanks!
Just to be clear, right now to launch automatic tests on Linux we have to use the windows compilated Pretzel?
It can be complicated for testing, but I'll think at a solution.

laedit pushed a commit that referenced this pull request Aug 10, 2015
@laedit laedit merged commit 7881076 into Code52:master Aug 10, 2015
@thiagojedi
Copy link
Contributor Author

Yes. Compile on Windows + .NET Framework, test on Unix + Mono.

That's one reason I didn't change the tests: I couldn't figure out how to set the mock file system to Unix style while at Windows. The other reason is I didn't want to brake the Windows implementation. 😅

@thiagojedi thiagojedi deleted the unix_fixes branch August 10, 2015 14:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants