Skip to content
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

RFC: Change examples to use async/await pattern + drop VS2010 compatibility #381

Closed
perlun opened this issue Jun 2, 2014 · 24 comments
Closed

Comments

@perlun
Copy link
Member

perlun commented Jun 2, 2014

Hi,

One question that has arisen after the discussion we had in #373 (as to the "be or not to be" for a locking-synchronous-Task-Wait-based approach), and the suggested approach for these kind of things for the future, is the way we we should recommend that these kind of things be done.

I mean, normally if you would have a method like this:

Task<string> GetSourceAsync()
{
    return "foo";
}

...which you would then call perhaps like this:

string source = await GetSourceAsync();

All fine and dandy. Only one problem:

  1. This requires VS2012 or newer, and
  2. It requires .NET 4.5, or the use of Microsoft.Bcl.Async which works quite well actually (using it personally).

In any way, I feel that since this is the "preferred approach" that we want to recommend people to use, it would be good if we would use it ourselves. 😃 So, here's my recommendation:

  1. We drop support for VS2010, and only support 2012 and 2013 onwards.
  2. We upgrade the example projects to use .NET 4.5, so we can go with async. Note: only the example projects; CefSharp still needs to be .NET 4.0 for a little while, since there might be user's who cannot upgrade to .NET 4.5 so easily (I happen to be one of them. 😉)

Comments?

@amaitland
Copy link
Member

What about keeping the core libraries at .Net 4.0, creating a separate solution -Core which maintains VS2010 support, then a separate -All solution that contains the Core + Examples, where the examples have been upgraded to .Net 4.5? Allows people that still require VS2010 to build CefSharp, and we can continue on our merry await way! 😄

As it seems rare to add/remove projects from the solutions as it stands, maintaining two shouldn't be too much work.

Thoughts?

@perlun
Copy link
Member Author

perlun commented Jun 2, 2014

We could of course do it like that also, but it raises the bar a bit for contributing to the project. It's quite nice to just be able to open the .sln and hack away.

Open question to everyone: How many of you are still using VS2010? (and have no access to VS2012 or 2013)
If the number of people affected is low, it's not a big deal, then we just drop 2010 (since CEF is also moving towards 2013 AFAIK).

Just to make it extremely explicit: 2010 users will still be able to use CefSharp as a consumer of the library (since it's .NET 4.0 for at least the near future), it's just that they won't be able to contribute to the project that might be a problem.

@amaitland
Copy link
Member

VS2012 and VS2013 here, only use VS2010 for legacy stuff (doesn't include CefSharp)

@ray007
Copy link

ray007 commented Jun 5, 2014

VS2010 here and no chance to change that anytime soon.

@JanEggers
Copy link
Contributor

personally i use vs 2013 so i dont mind dropping vs2010 support.

We upgrade the example projects to use .NET 4.5, so we can go with async. Note: only the example projects;

👍 it is up to the user to decide if they want to use await GetSourceAsync() or GetSourceAsync().ContinueWith()

so i dont see any reason why we should upgrade cefsharp to 4.5 as long as we dont need any features of it.

@jornh
Copy link
Contributor

jornh commented Jun 5, 2014

👍 for the same reasons as Jan nicely summed up + we still have the MinimalExample repo.

I think we can move this to 31.0.1 though - so that's how I marked it. It's not our contract, just polish of examples.

@jornh jornh added this to the 31.0.1 milestone Jun 5, 2014
@kropewnicki
Copy link
Contributor

I am using vs2010.

@amaitland
Copy link
Member

@kropewnicki Are you using VS2010 to compile CefSharp from source?

@kropewnicki
Copy link
Contributor

@amaitland Yes.

@amaitland
Copy link
Member

@kropewnicki Are you simply building to get access to features in master or actually modifying the source code?

If your just obtaining a build of master, then we can probably look at providing nightly builds available for download. Would that meet your requirements?

@kropewnicki
Copy link
Contributor

@amaitland
I am compiling from master, I modified to use the some newer CEF binaries.

@perlun
Copy link
Member Author

perlun commented Jun 9, 2014

OK. So we have at least two people @ray007 and @kropewnicki that are still using VS2010. Any reason that you cannot upgrade to either VS2012 or 2013? I guess you don't have MSDN partner download access or similar? (I do myself)

@amaitland
Copy link
Member

@kropewnicki What local modifications have you implemented? Is it something worth contributing to the project as a whole?

IMHO nightly builds would probably meet the requirements for most people

@kropewnicki
Copy link
Contributor

@perlun My team is all using vs2010. our company does volume license for products, not MSDN.

@perlun
Copy link
Member Author

perlun commented Jun 10, 2014

@kropewnicki, OK. Interesting to hear how popular VS2010 still is. Any way, we might still drop VS2010... What does the rest of you feel? How long (how many more years) is it worthwhile to support that one?

Given that C++/CLI support is extremely poor in VS2010 (no intellisense), I do not think it makes that much sense to support it for active development. If we decide to keep it, it's more a matter of being nice to people like @kropewnicki and @ray007 (and others). But it has to be weighed against the cost of maintaining the support (which is always greater than zero, which you sometimes tend to forget - TANSTAAFL).

@perlun
Copy link
Member Author

perlun commented Jun 10, 2014

I mean, we did support VS2008 just some year ago, until it was dropped... Maybe the time has come to also pull the plug on VS2010, since it actually lacks things very useful to us (async, await and friends).

@kropewnicki
Copy link
Contributor

@perlun I was thinking about this issue this morning. I was wondering about if you could drop vs2010, but add a minimal vs2010 example, that uses nuget to get the nightly build for cefsharp.

@oxbough
Copy link

oxbough commented Jun 11, 2014

The project I am trying to integrate cefsharp into uses VS2010. Part of a much bigger project. No signs that the team here is moving or can move to VS2012 or 13 anytime soon.

@perlun
Copy link
Member Author

perlun commented Jun 11, 2014

@perlun I was thinking about this issue this morning. I was wondering about if you could drop vs2010, but add a minimal vs2010 example, that uses nuget to get the nightly build for cefsharp.

The only problem with this is that:

  1. We don't do nightly builds at the moment (could of course be changed, especially now that we have AppVeyor on the track - @jornh, could you add a case for this please?)
  2. It is a bit of work to release NuGet packages for daily builds, but I guess sites like www.myget.org could be a huge help in this.

So, it's definitely doable, but these preconditions need to be met at the moment. I don't know, I have a feeling that it's more important to get 31.0.0 out the door asap rather than spend time on the nightlies at the moment. What do you feel?

@perlun
Copy link
Member Author

perlun commented Jun 11, 2014

The project I am trying to integrate cefsharp into uses VS2010. Part of a much bigger project. No signs that the team here is moving or can move to VS2012 or 13 anytime soon.

That is not a problem. We are not (and I repeat, not) speaking about upgrading CefSharp to in any way require .NET 4.5/VS2012/VS2013 as a "consumer" of the project. We are merely talking about our own .csproj/.sln files; it would make sense to start migrating the examples etc. to .NET 4.5 because it has useful features that we would make good use of being able to recommend to our users as the kind of "best practices".

I say 👍 for bumping the examples + starting to use async/await for them. It will still be possible to consume stuff using VS2010, it just requires a bit more "understanding how stuff works" for the VS2010 users (because they won't be able to copy/paste code from our examples as easily). Fair enough to me - it's soon 2 years since VS2012 was being released so kind of "optimizing for VS2012+" seems very reasonable for me.

So, in other words: support for VS2010 as a mere consumer of CefSharp will remain, but CefSharp itself will be upgraded to only support 2012 and 2013 (which simplifies things for us since we don't have to build as many different .dll files of the libcef_dll_wrapper etc) + that we can bump the examples to take advantage of async/await goodness - always a good thing.

@jornh jornh modified the milestones: 33.0.2, xx.0.3 Oct 24, 2014
@amaitland amaitland removed this from the xx.0.3 milestone Nov 11, 2014
@amaitland amaitland modified the milestones: 37.0.0, xx.0.3, 3000 Nov 11, 2014
@amaitland amaitland modified the milestones: 39.0.0, 3000 Dec 22, 2014
amaitland added a commit to amaitland/CefSharp that referenced this issue Jan 6, 2015
@amaitland
Copy link
Member

For version 39 I'm going to upgrade the examples to .Net 4.5. The core libraries are still .Net 4.0.

It's ticked over to 2015, so I think it's time, specially with the release of VS 2013 Community Edition allowing small companies and open source contributors free access to the equivalent of VS 2013 Professional

http://www.visualstudio.com/en-us/news/vs2013-community-vs.aspx

@amaitland
Copy link
Member

Commit amaitland@fc65192 resolves this Issue.

@perlun
Copy link
Member Author

perlun commented Jan 7, 2015

Great, thanks! I think we should not bump the core libraries to .Net 4.5 yet, unless it really causes problems for us to have them on 4.0.

As for me - has been extremely unavailable from the project for the last few months. Will maybe come in for a minor return within the next few months, since we will start upgrading to CefSharp3 (i.e. 37 or 39 or whatever the version is nowadays. 😄) But anyway, don't count on me as a "major" contributor this year, but more a minor collaborator amongst the peers.

@jornh
Copy link
Contributor

jornh commented Jan 7, 2015

Agree! (on the 4.0 vs 4.5 situation)

Anyho' good to "hear" from you @perlun 👍 ... I'm also still mostly lurking in the background 😵 and @amaitland + a few other semi-regular contributors have recently done a lot of good work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants