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

Fix map linting crashing for not existing directories #14136

Merged
merged 4 commits into from Oct 8, 2017

Conversation

Projects
None yet
4 participants
@abcdefg30
Member

abcdefg30 commented Oct 7, 2017

Fixes the regression that slipped in #13938 in (see #13938 (comment)).

For reference: https://logs.openra.net/?year=2017&month=08&day=30#15:42:38

Show outdated Hide outdated OpenRA.Game/Map/MapCache.cs Outdated
@abcdefg30

This comment has been minimized.

Show comment
Hide comment
@abcdefg30

abcdefg30 Oct 7, 2017

Member

Updated.

Member

abcdefg30 commented Oct 7, 2017

Updated.

@@ -122,6 +122,48 @@ public void LoadMaps()
}
}
public IEnumerable<Map> EnumerateMapsWithoutCaching(MapClassification classification = MapClassification.System)

This comment has been minimized.

@pchote

pchote Oct 8, 2017

Member

For this to work properly you will need to change the MapClassification definition to:

// Used for grouping maps in the UI and for filtering
[Flags]
public enum MapClassification
{
	Unknown = 0,
	System = 1,
	User = 2,
	Remote = 4
}
@pchote

pchote Oct 8, 2017

Member

For this to work properly you will need to change the MapClassification definition to:

// Used for grouping maps in the UI and for filtering
[Flags]
public enum MapClassification
{
	Unknown = 0,
	System = 1,
	User = 2,
	Remote = 4
}
Show outdated Hide outdated OpenRA.Game/Map/MapCache.cs Outdated
}
}
// Use all system maps for lint checking
maps = modData.MapCache.EnumerateMapsWithoutCaching().ToList();

This comment has been minimized.

@pchote

pchote Oct 8, 2017

Member

This is silently changing the command behaviour.

Please do EnumerateMapsWithoutCaching(MapClassification.System | MapClassification.User) and then remove the User in its own commit to make the intention clear.

@pchote

pchote Oct 8, 2017

Member

This is silently changing the command behaviour.

Please do EnumerateMapsWithoutCaching(MapClassification.System | MapClassification.User) and then remove the User in its own commit to make the intention clear.

}
}
}
Console.WriteLine(map.Package.Name);

This comment has been minimized.

@pchote

pchote Oct 8, 2017

Member

Left over debugging code?

@pchote

pchote Oct 8, 2017

Member

Left over debugging code?

This comment has been minimized.

@abcdefg30

abcdefg30 Oct 8, 2017

Member

This is intentional. We also print out which yaml files are currently upgraded. It also takes quite a while to update all maps, and you're left without knowing if something even happens.

@abcdefg30

abcdefg30 Oct 8, 2017

Member

This is intentional. We also print out which yaml files are currently upgraded. It also takes quite a while to update all maps, and you're left without knowing if something even happens.

Show outdated Hide outdated OpenRA.Game/Map/MapCache.cs Outdated
@abcdefg30

This comment has been minimized.

Show comment
Hide comment
@abcdefg30

abcdefg30 Oct 8, 2017

Member

Updated.

Member

abcdefg30 commented Oct 8, 2017

Updated.

abcdefg30 added some commits Oct 7, 2017

Log which maps are processed by UpgradeModCommand
Upgrading the maps can take quite some time,
and at the moment you are left without information if something is happening.
@pchote

pchote approved these changes Oct 8, 2017

@pchote pchote merged commit 0727f7e into OpenRA:bleed Oct 8, 2017

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@abcdefg30 abcdefg30 deleted the abcdefg30:cacheMaps branch Oct 8, 2017

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